Mercurial > sdl-ios-xcode
comparison test/checkkeys.c @ 2315:95586dfe1992
Show integer scancode, since that's how it's defined in the header.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 10 Feb 2008 17:29:23 +0000 |
parents | 47f8a579cd9b |
children | 95352c671a6e |
comparison
equal
deleted
inserted
replaced
2314:33052794de27 | 2315:95586dfe1992 |
---|---|
55 static void | 55 static void |
56 PrintKey(SDL_keysym * sym, int pressed) | 56 PrintKey(SDL_keysym * sym, int pressed) |
57 { | 57 { |
58 /* Print the keycode, name and state */ | 58 /* Print the keycode, name and state */ |
59 if (sym->sym) { | 59 if (sym->sym) { |
60 printf("Key %s: scancode 0x%04X = %s, keycode 0x%08X = %s ", | 60 printf("Key %s: scancode %d = %s, keycode 0x%08X = %s ", |
61 pressed ? "pressed " : "released", | 61 pressed ? "pressed " : "released", |
62 sym->scancode, | 62 sym->scancode, |
63 SDL_GetScancodeName(sym->scancode), | 63 SDL_GetScancodeName(sym->scancode), |
64 sym->sym, SDL_GetKeyName(sym->sym)); | 64 sym->sym, SDL_GetKeyName(sym->sym)); |
65 } else { | 65 } else { |
66 printf("Unknown Key (scancode = 0x%04X = %s) %s ", | 66 printf("Unknown Key (scancode %d = %s) %s ", |
67 sym->scancode, | 67 sym->scancode, |
68 SDL_GetScancodeName(sym->scancode), | 68 SDL_GetScancodeName(sym->scancode), |
69 pressed ? "pressed" : "released"); | 69 pressed ? "pressed" : "released"); |
70 } | 70 } |
71 | 71 |