diff test/checkkeys.c @ 2295:dbc6d1893869

Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
author Bob Pendleton <bob@pendleton.com>
date Tue, 08 Jan 2008 00:10:46 +0000
parents c121d94672cb
children c97ad1abe05b
line wrap: on
line diff
--- a/test/checkkeys.c	Thu Jan 03 06:07:30 2008 +0000
+++ b/test/checkkeys.c	Tue Jan 08 00:10:46 2008 +0000
@@ -57,11 +57,15 @@
 {
     /* Print the keycode, name and state */
     if (sym->sym) {
-        printf("Key %s:  %d-%s ", pressed ? "pressed" : "released",
-               sym->sym, SDL_GetKeyName(sym->sym));
+        printf("Key %s:  physical 0x%08X = %s, layout 0x%08X = %s ",
+               pressed ? "pressed " : "released",
+               sym->sym,
+               SDL_GetKeyName(sym->sym),
+               SDL_GetLayoutKey(sym->sym),
+               SDL_GetKeyName(SDL_GetLayoutKey(sym->sym)));
     } else {
-        printf("Unknown Key (scancode = %d) %s ", sym->scancode,
-               pressed ? "pressed" : "released");
+        printf("Unknown Key (scancode = 0x%08X) %s ",
+               sym->scancode, pressed ? "pressed" : "released");
     }
 
     /* Print the translated character, if one exists */