test/testkeys.c
author Sam Lantinga <slouken@lokigames.com>
Thu, 26 Apr 2001 16:45:43 +0000
changeset 0 74212992fb08
child 1154 d93862a3d821
permissions -rw-r--r--
Initial revision
slouken@0
     1
slouken@0
     2
/* Print out all the keysyms we have, just to verify them */
slouken@0
     3
slouken@0
     4
#include <stdio.h>
slouken@0
     5
#include <ctype.h>
slouken@0
     6
slouken@0
     7
#include "SDL.h"
slouken@0
     8
slouken@0
     9
int main(int argc, char *argv[])
slouken@0
    10
{
slouken@0
    11
	SDLKey key;
slouken@0
    12
slouken@0
    13
	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
slouken@0
    14
		fprintf(stderr, "Couldn't initialize SDL: %s\n",
slouken@0
    15
							SDL_GetError());
slouken@0
    16
		exit(1);
slouken@0
    17
	}
slouken@0
    18
	for ( key=SDLK_FIRST; key<SDLK_LAST; ++key ) {
slouken@0
    19
		printf("Key #%d, \"%s\"\n", key, SDL_GetKeyName(key));
slouken@0
    20
	}
slouken@0
    21
	SDL_Quit();
slouken@0
    22
	return(0);
slouken@0
    23
}