Mercurial > sdl-ios-xcode
diff test/checkkeys.c @ 2303:d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Christian Walther. Currently only implemented on Mac OS X for sanity
checking purposes.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 05 Feb 2008 07:19:23 +0000 |
parents | c97ad1abe05b |
children | fbe8ff44c519 |
line wrap: on
line diff
--- a/test/checkkeys.c Mon Feb 04 17:25:33 2008 +0000 +++ b/test/checkkeys.c Tue Feb 05 07:19:23 2008 +0000 @@ -40,10 +40,10 @@ printf(" LALT"); if (mod & KMOD_RALT) printf(" RALT"); - if (mod & KMOD_LMETA) - printf(" LMETA"); - if (mod & KMOD_RMETA) - printf(" RMETA"); + if (mod & KMOD_LGUI) + printf(" LGUI"); + if (mod & KMOD_RGUI) + printf(" RGUI"); if (mod & KMOD_NUM) printf(" NUM"); if (mod & KMOD_CAPS) @@ -57,14 +57,13 @@ { /* Print the keycode, name and state */ if (sym->sym) { - printf("Key %s: physical 0x%08X = %s, layout 0x%08X = %s ", + printf("Key %s: scancode 0x%04X = %s, keycode 0x%08X = %s ", pressed ? "pressed " : "released", - sym->sym, - SDL_GetKeyName(sym->sym), - SDL_GetLayoutKey(sym->sym), - SDL_GetKeyName(SDL_GetLayoutKey(sym->sym))); + sym->scancode, + SDL_GetScancodeName(sym->scancode), + sym->sym, SDL_GetKeyName(sym->sym)); } else { - printf("Unknown Key (scancode = 0x%08X) %s ", + printf("Unknown Key (scancode = 0x%04X) %s ", sym->scancode, pressed ? "pressed" : "released"); }