From 79fd3ca65c88f5320e082ffca6c3c1e70fb51ba1 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sun, 3 May 2020 05:15:18 -0700 Subject: [PATCH] Prevent escape key from exiting full screen mode --- platform_mac/mac_4ed.mm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index 2b1674a1..beb547a1 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -911,10 +911,12 @@ mac_toggle_fullscreen(void){ #endif } -// NOTE(allen): Trying to figure out a way to stop the error bonk sound every time I use a key combo. -// This stopped the sound as the docs suggested, but also stopped the key combo from being processed? -// Maybe put process_keyboard_event in there? But is this only sent for key downs? And why doesn't -// this block normal text input but only key combos?? +// NOTE(allen): Trying to figure out a way to stop the error bonk +// sound every time I use a key combo. This stopped the sound as the +// docs suggested, but also stopped the key combo from being processed? +// Maybe put process_keyboard_event in there? But is this only sent +// for key downs? And why doesn't this block normal text input but +// only key combos?? #if 1 - (BOOL)performKeyEquivalent:(NSEvent *)event{ [self process_keyboard_event:event down:true]; @@ -922,6 +924,11 @@ mac_toggle_fullscreen(void){ } #endif +#if 1 +- (void)cancelOperation:(id)sender +{} +#endif + - (BOOL)acceptsFirstResponder{ return(YES); }