test/testkeys.c
changeset 2306 1a8bab15a45d
parent 1895 c121d94672cb
child 5081 25d4feb7c127
     1.1 --- a/test/testkeys.c	Thu Feb 07 15:31:09 2008 +0000
     1.2 +++ b/test/testkeys.c	Thu Feb 07 16:00:29 2008 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  
     1.5 -/* Print out all the keysyms we have, just to verify them */
     1.6 +/* Print out all the scancodes we have, just to verify them */
     1.7  
     1.8  #include <stdio.h>
     1.9  #include <ctype.h>
    1.10 @@ -11,14 +11,15 @@
    1.11  int
    1.12  main(int argc, char *argv[])
    1.13  {
    1.14 -    SDLKey key;
    1.15 +    SDL_scancode scancode;
    1.16  
    1.17      if (SDL_Init(SDL_INIT_VIDEO) < 0) {
    1.18          fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.19          exit(1);
    1.20      }
    1.21 -    for (key = SDLK_FIRST; key < SDLK_LAST; ++key) {
    1.22 -        printf("Key #%d, \"%s\"\n", key, SDL_GetKeyName(key));
    1.23 +    for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
    1.24 +        printf("Scancode #%d, \"%s\"\n", scancode,
    1.25 +               SDL_GetScancodeName(scancode));
    1.26      }
    1.27      SDL_Quit();
    1.28      return (0);