test/checkkeys.c
changeset 9667 e55dad50b3ae
parent 9619 b94b6d0bff0f
child 9922 b066d5fd5fa7
     1.1 --- a/test/checkkeys.c	Thu May 28 09:33:47 2015 -0700
     1.2 +++ b/test/checkkeys.c	Thu May 28 09:52:48 2015 -0700
     1.3 @@ -89,6 +89,20 @@
     1.4  }
     1.5  
     1.6  static void
     1.7 +PrintModifierState()
     1.8 +{
     1.9 +    char message[512];
    1.10 +    char *spot;
    1.11 +    size_t left;
    1.12 +
    1.13 +    spot = message;
    1.14 +    left = sizeof(message);
    1.15 +
    1.16 +    print_modifiers(&spot, &left);
    1.17 +    SDL_Log("Initial state:%s\n", message);
    1.18 +}
    1.19 +
    1.20 +static void
    1.21  PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)
    1.22  {
    1.23      char message[512];
    1.24 @@ -200,6 +214,10 @@
    1.25  
    1.26      SDL_StartTextInput();
    1.27  
    1.28 +    /* Print initial modifier state */
    1.29 +    SDL_PumpEvents();
    1.30 +    PrintModifierState();
    1.31 +
    1.32      /* Watch keystrokes */
    1.33      done = 0;
    1.34