From 8397bfa2ae3f3ce0ff0d14d23664222f6f47dc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 24 Feb 2014 16:42:08 -0800 Subject: [PATCH] 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index b3baa8378..9e9fccf55 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]; }