Don't print "unrecognized key" message for an X11 keycode of 0. This can happen with composed characters.
authorSam Lantinga <slouken@libsdl.org>
Mon, 12 Aug 2013 22:00:21 -0700
changeset 7638 783d1cff9b20
parent 7637 13522dc3e9da
child 7639 9406b7dd2f2d
Don't print "unrecognized key" message for an X11 keycode of 0. This can happen with composed characters.
src/video/x11/SDL_x11events.c
--- a/src/video/x11/SDL_x11events.c	Mon Aug 12 19:18:48 2013 -0700
+++ b/src/video/x11/SDL_x11events.c	Mon Aug 12 22:00:21 2013 -0700
@@ -440,7 +440,7 @@
 #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