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