Mac: Fix inconsistent repeat of SDL_TEXTINPUT events on 10.7+
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Mon, 24 Feb 2014 16:42:08 -0800
changeset 8250 e671ec6b22dd
parent 8249 294f28074ecc
child 8251 833eae6867c2
Mac: Fix inconsistent repeat of SDL_TEXTINPUT events on 10.7+ Due to the new "tap and hold" IME in Mountain Lion and above, we were getting inconsistent repeat of SDL_TEXTINPUT events. Disabling that functionality (since you can't see the popover anyway) solves this. Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2387
src/video/cocoa/SDL_cocoaevents.m
--- a/src/video/cocoa/SDL_cocoaevents.m	Mon Feb 24 18:57:22 2014 -0300
+++ b/src/video/cocoa/SDL_cocoaevents.m	Mon Feb 24 16:42:08 2014 -0800
@@ -271,7 +271,10 @@
             CreateApplicationMenus();
         }
         [NSApp finishLaunching];
-        NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"AppleMomentumScrollSupported"];
+        NSDictionary *appDefaults = @{
+            @"AppleMomentumScrollSupported": @NO,
+            @"ApplePressAndHoldEnabled": @NO,
+        };
         [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
 
     }