From 67367be0197e9a398ab4ee50afdb155f43bd1c62 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 12 Aug 2013 22:00:21 -0700 Subject: [PATCH] Don't print "unrecognized key" message for an X11 keycode of 0. This can happen with composed characters. --- src/video/x11/SDL_x11events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index a9a3ac996..4bdfd1c6e 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -440,7 +440,7 @@ X11_DispatchEvent(_THIS) #endif SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]); #if 1 - if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN) { + if (videodata->key_layout[keycode] == SDL_SCANCODE_UNKNOWN && keycode) { int min_keycode, max_keycode; XDisplayKeycodes(display, &min_keycode, &max_keycode); #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM