# HG changeset patch # User Sam Lantinga # Date 1279440001 25200 # Node ID ce811c9247da333c72b28b841d381448d71a67db # Parent 9530f2e23f99c64779df7d140c1b2efa58633639 Added back in a little more debugging for the X11 keyboard code diff -r 9530f2e23f99 -r ce811c9247da src/video/x11/SDL_x11events.c --- a/src/video/x11/SDL_x11events.c Sun Jul 18 00:54:26 2010 -0700 +++ b/src/video/x11/SDL_x11events.c Sun Jul 18 01:00:01 2010 -0700 @@ -34,7 +34,7 @@ #include "SDL_timer.h" #include "SDL_syswm.h" -/*#define DEBUG_XEVENTS*/ +#define DEBUG_XEVENTS static void X11_DispatchEvent(_THIS) @@ -181,7 +181,7 @@ printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode); #endif SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); -#if 0 +#if 1 if (videodata->key_layout[keycode] == SDLK_UNKNOWN) { int min_keycode, max_keycode; XDisplayKeycodes(display, &min_keycode, &max_keycode); diff -r 9530f2e23f99 -r ce811c9247da src/video/x11/SDL_x11keyboard.c --- a/src/video/x11/SDL_x11keyboard.c Sun Jul 18 00:54:26 2010 -0700 +++ b/src/video/x11/SDL_x11keyboard.c Sun Jul 18 01:00:01 2010 -0700 @@ -211,7 +211,9 @@ } } if (j == SDL_arraysize(fingerprint)) { - /* printf("Using scancode set %d\n", i); */ +#ifdef DEBUG_KEYBOARD + printf("Using scancode set %d, min_keycode = %d, max_keycode = %d, table_size = %d\n", i, min_keycode, max_keycode, scancode_set[i].table_size); +#endif SDL_memcpy(&data->key_layout[min_keycode], scancode_set[i].table, sizeof(SDL_scancode) * scancode_set[i].table_size); fingerprint_detected = SDL_TRUE;