1.1 --- a/src/video/x11/SDL_x11events.c Wed Nov 02 02:50:27 2016 -0700
1.2 +++ b/src/video/x11/SDL_x11events.c Wed Nov 02 02:56:54 2016 -0700
1.3 @@ -585,9 +585,6 @@
1.4 #endif
1.5 }
1.6 return;
1.7 - } else if (orig_keycode == videodata->filter_code && xevent.xkey.time == videodata->filter_time) {
1.8 - /* This is a duplicate event, resent by an IME - skip it. */
1.9 - return;
1.10 }
1.11
1.12 /* Send a SDL_SYSWMEVENT if the application wants them */
1.13 @@ -802,7 +799,10 @@
1.14 }
1.15 #endif
1.16 if (!handled_by_ime) {
1.17 - SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
1.18 + /* Don't send the key if it looks like a duplicate of a filtered key sent by an IME */
1.19 + if (xevent.xkey.keycode != videodata->filter_code || xevent.xkey.time != videodata->filter_time) {
1.20 + SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
1.21 + }
1.22 if(*text) {
1.23 SDL_SendKeyboardText(text);
1.24 }