test/testkeys.c
author Sam Lantinga <slouken@libsdl.org>
Sat, 04 Feb 2006 16:29:22 +0000
changeset 1328 27ddb06a0bca
parent 1154 d93862a3d821
child 1662 782fd950bd46
child 1895 c121d94672cb
permissions -rw-r--r--
Date: Sat, 04 Feb 2006 19:47:23 +0900
From: Hayashi Naoyuki
Subject: Re: [SDL] Character Composition problem on X

The compilation fails.
cc: Error: SDL_x11events.c, line 717: In this statement, "XK_dead_hook"
is not declared. (undeclared)
ODD_keymap[XK_dead_hook&0xFF] = SDLK_COMPOSE;
-------------------^
cc: Error: SDL_x11events.c, line 718: In this statement, "XK_dead_horn"
is not declared. (undeclared)
ODD_keymap[XK_dead_horn&0xFF] = SDLK_COMPOSE;

Neither XK_dead_hook nor XK_dead_horn are defined on Tru64.
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>
icculus@1154
     6
#include <stdlib.h>
icculus@1154
     7
#include <string.h>
slouken@0
     8
slouken@0
     9
#include "SDL.h"
slouken@0
    10
slouken@0
    11
int main(int argc, char *argv[])
slouken@0
    12
{
slouken@0
    13
	SDLKey key;
slouken@0
    14
slouken@0
    15
	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
slouken@0
    16
		fprintf(stderr, "Couldn't initialize SDL: %s\n",
slouken@0
    17
							SDL_GetError());
slouken@0
    18
		exit(1);
slouken@0
    19
	}
slouken@0
    20
	for ( key=SDLK_FIRST; key<SDLK_LAST; ++key ) {
slouken@0
    21
		printf("Key #%d, \"%s\"\n", key, SDL_GetKeyName(key));
slouken@0
    22
	}
slouken@0
    23
	SDL_Quit();
slouken@0
    24
	return(0);
slouken@0
    25
}