diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-05-17 17:51:08 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-05-19 13:17:31 -0400 |
commit | 771d8803dddfda2bd161821c217e7e8f3d56fd47 (patch) | |
tree | 653d655ecb3dc5d86a8efd9c84c98d2125cc8b74 | |
parent | 2b2367b6ff228ec8b4aa5d25fb7757ee1fa081e8 (diff) | |
download | efl-771d8803dddfda2bd161821c217e7e8f3d56fd47.tar.gz |
ecore-wl2: block key->string translation when appropriate
copied from libX11.
I don't understand what's going on here but this fixes input bugs such
as, e.g., holding ctrl and pressing shift affecting cursor position in
terminology
@fix
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_input.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 790ef8ae86..2853f3b140 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -493,6 +493,19 @@ in this Software without prior written authorization from The Open Group. unsigned char c; hbytes = (keysym >> 8); + if (!(bytes && + ((hbytes == 0) || + ((hbytes == 0xFF) && + (((keysym >= XKB_KEY_BackSpace) && (keysym <= XKB_KEY_Clear)) || + (keysym == XKB_KEY_Return) || + (keysym == XKB_KEY_Escape) || + (keysym == XKB_KEY_KP_Space) || + (keysym == XKB_KEY_KP_Tab) || + (keysym == XKB_KEY_KP_Enter) || + ((keysym >= XKB_KEY_KP_Multiply) && (keysym <= XKB_KEY_KP_9)) || + (keysym == XKB_KEY_KP_Equal) || + (keysym == XKB_KEY_Delete)))))) + return 0; if (keysym == XKB_KEY_KP_Space) c = (XKB_KEY_space & 0x7F); |