diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index 786166a7b9..74ef5c1cc8 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -680,7 +680,10 @@ void ProcessMouseButtonEvent(NSEvent* theEvent) void ProcessMouseWheelEvent(NSEvent* theEvent) { - const CGFloat delta = [theEvent deltaY]; + const SWORD modifiers = ModifierFlagsToGUIKeyModifiers(theEvent); + const CGFloat delta = (modifiers & GKM_SHIFT) + ? [theEvent deltaX] + : [theEvent deltaY]; const bool isZeroDelta = fabs(delta) < 1.0E-5; if (isZeroDelta && GUICapture) @@ -694,7 +697,7 @@ void ProcessMouseWheelEvent(NSEvent* theEvent) { event.type = EV_GUI_Event; event.subtype = delta > 0.0f ? EV_GUI_WheelUp : EV_GUI_WheelDown; - event.data3 = ModifierFlagsToGUIKeyModifiers(theEvent); + event.data3 = modifiers; } else {