Don't print "unrecognized key" message for an X11 keycode of 0. This can happen with composed characters.

This commit is contained in:
Sam Lantinga 2013-08-12 22:00:21 -07:00
parent 5d1865c245
commit 67367be019
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ X11_DispatchEvent(_THIS)
#endif #endif
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
#if 1 #if 1
if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN) { if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN && keycode) {
int min_keycode, max_keycode; int min_keycode, max_keycode;
XDisplayKeycodes(display, &min_keycode, &max_keycode); XDisplayKeycodes(display, &min_keycode, &max_keycode);
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM