Mac: Whoops, lost legit Caps lock keypress events. Fixed.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 28 Dec 2015 13:30:58 -0500
changeset 9975 bb853b9549d0
parent 9974 05770dc93c95
child 9976 9637657107a3
Mac: Whoops, lost legit Caps lock keypress events. Fixed.
src/video/cocoa/SDL_cocoakeyboard.m
--- a/src/video/cocoa/SDL_cocoakeyboard.m	Mon Dec 28 13:08:19 2015 -0500
+++ b/src/video/cocoa/SDL_cocoakeyboard.m	Mon Dec 28 13:30:58 2015 -0500
@@ -341,7 +341,8 @@
     newMask = newMods & NSAlphaShiftKeyMask;
 
     if (oldMask != newMask) {
-        SDL_ToggleModState(KMOD_CAPS, newMask != 0);
+        SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_CAPSLOCK);
+        SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_CAPSLOCK);
     }
 }