src/video/x11/SDL_x11keyboard.c
changeset 3667 cc7eca3a4e13
parent 3162 dc1eb82ffdaa
child 3697 f7b03b6838cb
equal deleted inserted replaced
3666:0d58847d1e2a 3667:cc7eca3a4e13
   231         for (i = min_keycode; i <= max_keycode; ++i) {
   231         for (i = min_keycode; i <= max_keycode; ++i) {
   232             KeySym sym;
   232             KeySym sym;
   233             sym = XKeycodeToKeysym(data->display, i, 0);
   233             sym = XKeycodeToKeysym(data->display, i, 0);
   234             if (sym != NoSymbol) {
   234             if (sym != NoSymbol) {
   235                 SDLKey key;
   235                 SDLKey key;
   236                 printf("code = %d, sym = 0x%X (%s) ", i - min_keycode, sym,
   236                 printf("code = %d, sym = 0x%X (%s) ", i - min_keycode,
   237                        XKeysymToString(sym));
   237                        (unsigned int) sym, XKeysymToString(sym));
   238                 key = X11_KeyCodeToSDLKey(data->display, i);
   238                 key = X11_KeyCodeToSDLKey(data->display, i);
   239                 for (j = 0; j < SDL_arraysize(keymap); ++j) {
   239                 for (j = 0; j < SDL_arraysize(keymap); ++j) {
   240                     if (keymap[j] == key) {
   240                     if (keymap[j] == key) {
   241                         data->key_layout[i] = (SDL_scancode) j;
   241                         data->key_layout[i] = (SDL_scancode) j;
   242                         break;
   242                         break;