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
This commit is contained in:
Mike Blumenkrantz 2017-05-17 17:51:08 -04:00
parent 2b2367b6ff
commit 771d8803dd
1 changed files with 13 additions and 0 deletions

View File

@ -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);