diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index 78841d906..c6fc86e44 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -559,11 +559,13 @@ void ProcessKeyboardEvent(NSEvent* theEvent) return; } + const bool isARepeat = [theEvent isARepeat]; + if (k_allowfullscreentoggle && (kVK_ANSI_F == keyCode) && (NSCommandKeyMask & [theEvent modifierFlags]) && (NSKeyDown == [theEvent type]) - && ![theEvent isARepeat]) + && !isARepeat) { ToggleFullscreen = !ToggleFullscreen; return; @@ -573,7 +575,7 @@ void ProcessKeyboardEvent(NSEvent* theEvent) { ProcessKeyboardEventInMenu(theEvent); } - else + else if (!isARepeat) { event_t event = {};