Commit d6b1218b464e0e11c23aef3f683a56988798d3ba

J?rgen P. Tjern? 2014-02-24T16:42:08

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index b3baa83..9e9fccf 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -271,7 +271,10 @@ Cocoa_RegisterApp(void)
             CreateApplicationMenus();
         }
         [NSApp finishLaunching];
-        NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"AppleMomentumScrollSupported"];
+        NSDictionary *appDefaults = @{
+            @"AppleMomentumScrollSupported": @NO,
+            @"ApplePressAndHoldEnabled": @NO,
+        };
         [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
 
     }