Windows: resync num/caps lock when window is gaining focus.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 28 Dec 2015 13:08:19 -0500
changeset 997405770dc93c95
parent 9973 4d8a561cf978
child 9975 bb853b9549d0
Windows: resync num/caps lock when window is gaining focus.
src/video/windows/SDL_windowsevents.c
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Mon Dec 28 13:07:44 2015 -0500
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Mon Dec 28 13:08:19 2015 -0500
     1.3 @@ -415,6 +415,9 @@
     1.4                   * FIXME: Update keyboard state
     1.5                   */
     1.6                  WIN_CheckClipboardUpdate(data->videodata);
     1.7 +
     1.8 +                SDL_ToggleModState(KMOD_CAPS, (GetKeyState(VK_CAPITAL) & 0x0001) != 0);
     1.9 +                SDL_ToggleModState(KMOD_NUM, (GetKeyState(VK_NUMLOCK) & 0x0001) != 0);
    1.10              } else {
    1.11                  if (SDL_GetKeyboardFocus() == data->window) {
    1.12                      SDL_SetKeyboardFocus(NULL);