comparison src/video/x11/SDL_x11events.c @ 4535:ce811c9247da

Added back in a little more debugging for the X11 keyboard code
author Sam Lantinga <slouken@libsdl.org>
date Sun, 18 Jul 2010 01:00:01 -0700
parents a256e1dadf3f
children cc06f306c053
comparison
equal deleted inserted replaced
4534:9530f2e23f99 4535:ce811c9247da
32 #include "../../events/SDL_mouse_c.h" 32 #include "../../events/SDL_mouse_c.h"
33 33
34 #include "SDL_timer.h" 34 #include "SDL_timer.h"
35 #include "SDL_syswm.h" 35 #include "SDL_syswm.h"
36 36
37 /*#define DEBUG_XEVENTS*/ 37 #define DEBUG_XEVENTS
38 38
39 static void 39 static void
40 X11_DispatchEvent(_THIS) 40 X11_DispatchEvent(_THIS)
41 { 41 {
42 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata; 42 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
179 179
180 #ifdef DEBUG_XEVENTS 180 #ifdef DEBUG_XEVENTS
181 printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode); 181 printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
182 #endif 182 #endif
183 SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); 183 SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
184 #if 0 184 #if 1
185 if (videodata->key_layout[keycode] == SDLK_UNKNOWN) { 185 if (videodata->key_layout[keycode] == SDLK_UNKNOWN) {
186 int min_keycode, max_keycode; 186 int min_keycode, max_keycode;
187 XDisplayKeycodes(display, &min_keycode, &max_keycode); 187 XDisplayKeycodes(display, &min_keycode, &max_keycode);
188 keysym = XKeycodeToKeysym(display, keycode, 0); 188 keysym = XKeycodeToKeysym(display, keycode, 0);
189 fprintf(stderr, 189 fprintf(stderr,