test/testkeys.c
author Paul Hunkin <paul@bieh.net>
Mon, 17 May 2010 15:14:34 +1200
changeset 4695 b7918263da92
parent 2306 1a8bab15a45d
child 5081 25d4feb7c127
permissions -rw-r--r--
Initial commit, adding __ANDROID__ to the platform list
     1 
     2 /* Print out all the scancodes we have, just to verify them */
     3 
     4 #include <stdio.h>
     5 #include <ctype.h>
     6 #include <stdlib.h>
     7 #include <string.h>
     8 
     9 #include "SDL.h"
    10 
    11 int
    12 main(int argc, char *argv[])
    13 {
    14     SDL_scancode scancode;
    15 
    16     if (SDL_Init(SDL_INIT_VIDEO) < 0) {
    17         fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    18         exit(1);
    19     }
    20     for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
    21         printf("Scancode #%d, \"%s\"\n", scancode,
    22                SDL_GetScancodeName(scancode));
    23     }
    24     SDL_Quit();
    25     return (0);
    26 }