From 51c1d69d13939e606675843ecff0026f06ecdf08 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 28 Dec 2015 13:30:58 -0500 Subject: [PATCH] Mac: Whoops, lost legit Caps lock keypress events. Fixed. --- src/video/cocoa/SDL_cocoakeyboard.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m index 95598e718..b6926a939 100644 --- a/src/video/cocoa/SDL_cocoakeyboard.m +++ b/src/video/cocoa/SDL_cocoakeyboard.m @@ -341,7 +341,8 @@ HandleCapsLock(unsigned short scancode, 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); } }