The keyboard text events should be sent after the key down events
authorSam Lantinga <slouken@libsdl.org>
Fri, 16 Aug 2013 15:38:06 -0700
changeset 764642c3b0c24c6c
parent 7645 cc775832d501
child 7647 832a72fc1c94
The keyboard text events should be sent after the key down events
src/video/windows/SDL_windowsevents.c
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Fri Aug 16 15:35:10 2013 -0700
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Fri Aug 16 15:38:06 2013 -0700
     1.3 @@ -487,7 +487,14 @@
     1.4  #endif /* WM_MOUSELEAVE */
     1.5  
     1.6      case WM_KEYDOWN:
     1.7 +    case WM_SYSKEYDOWN:
     1.8          {
     1.9 +            SDL_Scancode code = WindowsScanCodeToSDLScanCode( lParam, wParam );
    1.10 +            if ( code != SDL_SCANCODE_UNKNOWN ) {
    1.11 +                SDL_SendKeyboardKey(SDL_PRESSED, code );
    1.12 +            }
    1.13 +        }
    1.14 +        if (msg == WM_KEYDOWN) {
    1.15              BYTE keyboardState[256];
    1.16              char text[5];
    1.17              UINT32 utf32 = 0;
    1.18 @@ -501,14 +508,6 @@
    1.19                  }
    1.20              }
    1.21          }
    1.22 -        // no break
    1.23 -    case WM_SYSKEYDOWN:
    1.24 -        {
    1.25 -            SDL_Scancode code = WindowsScanCodeToSDLScanCode( lParam, wParam );
    1.26 -            if ( code != SDL_SCANCODE_UNKNOWN ) {
    1.27 -                SDL_SendKeyboardKey(SDL_PRESSED, code );
    1.28 -            }
    1.29 -        }
    1.30          returnCode = 0;
    1.31          break;
    1.32