Added back in a little more debugging for the X11 keyboard code
authorSam Lantinga
Sun, 18 Jul 2010 01:00:01 -0700
changeset 4535ce811c9247da
parent 4534 9530f2e23f99
child 4536 743930106dd7
Added back in a little more debugging for the X11 keyboard code
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11keyboard.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Sun Jul 18 00:54:26 2010 -0700
     1.2 +++ b/src/video/x11/SDL_x11events.c	Sun Jul 18 01:00:01 2010 -0700
     1.3 @@ -34,7 +34,7 @@
     1.4  #include "SDL_timer.h"
     1.5  #include "SDL_syswm.h"
     1.6  
     1.7 -/*#define DEBUG_XEVENTS*/
     1.8 +#define DEBUG_XEVENTS
     1.9  
    1.10  static void
    1.11  X11_DispatchEvent(_THIS)
    1.12 @@ -181,7 +181,7 @@
    1.13              printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
    1.14  #endif
    1.15              SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
    1.16 -#if 0
    1.17 +#if 1
    1.18              if (videodata->key_layout[keycode] == SDLK_UNKNOWN) {
    1.19                  int min_keycode, max_keycode;
    1.20                  XDisplayKeycodes(display, &min_keycode, &max_keycode);
     2.1 --- a/src/video/x11/SDL_x11keyboard.c	Sun Jul 18 00:54:26 2010 -0700
     2.2 +++ b/src/video/x11/SDL_x11keyboard.c	Sun Jul 18 01:00:01 2010 -0700
     2.3 @@ -211,7 +211,9 @@
     2.4              }
     2.5          }
     2.6          if (j == SDL_arraysize(fingerprint)) {
     2.7 -            /* printf("Using scancode set %d\n", i); */
     2.8 +#ifdef DEBUG_KEYBOARD
     2.9 +            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);
    2.10 +#endif
    2.11              SDL_memcpy(&data->key_layout[min_keycode], scancode_set[i].table,
    2.12                         sizeof(SDL_scancode) * scancode_set[i].table_size);
    2.13              fingerprint_detected = SDL_TRUE;