test/checkkeys.c
changeset 2295 dbc6d1893869
parent 1895 c121d94672cb
child 2300 c97ad1abe05b
     1.1 --- a/test/checkkeys.c	Thu Jan 03 06:07:30 2008 +0000
     1.2 +++ b/test/checkkeys.c	Tue Jan 08 00:10:46 2008 +0000
     1.3 @@ -57,11 +57,15 @@
     1.4  {
     1.5      /* Print the keycode, name and state */
     1.6      if (sym->sym) {
     1.7 -        printf("Key %s:  %d-%s ", pressed ? "pressed" : "released",
     1.8 -               sym->sym, SDL_GetKeyName(sym->sym));
     1.9 +        printf("Key %s:  physical 0x%08X = %s, layout 0x%08X = %s ",
    1.10 +               pressed ? "pressed " : "released",
    1.11 +               sym->sym,
    1.12 +               SDL_GetKeyName(sym->sym),
    1.13 +               SDL_GetLayoutKey(sym->sym),
    1.14 +               SDL_GetKeyName(SDL_GetLayoutKey(sym->sym)));
    1.15      } else {
    1.16 -        printf("Unknown Key (scancode = %d) %s ", sym->scancode,
    1.17 -               pressed ? "pressed" : "released");
    1.18 +        printf("Unknown Key (scancode = 0x%08X) %s ",
    1.19 +               sym->scancode, pressed ? "pressed" : "released");
    1.20      }
    1.21  
    1.22      /* Print the translated character, if one exists */