Fix modifier keys causing key-code mismatch on Linux/X11.
This commit is contained in:
parent
007a46ef6b
commit
bd63d3e1ec
1 changed files with 4 additions and 1 deletions
|
@ -1757,7 +1757,10 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
|
||||||
|
|
||||||
// XLookupString returns keysyms usable as nice scancodes/
|
// XLookupString returns keysyms usable as nice scancodes/
|
||||||
char str[256 + 1];
|
char str[256 + 1];
|
||||||
XLookupString(xkeyevent, str, 256, &keysym_keycode, NULL);
|
XKeyEvent xkeyevent_no_mod = *xkeyevent;
|
||||||
|
xkeyevent_no_mod.state &= ~ShiftMask;
|
||||||
|
xkeyevent_no_mod.state &= ~ControlMask;
|
||||||
|
XLookupString(&xkeyevent_no_mod, str, 256, &keysym_keycode, NULL);
|
||||||
|
|
||||||
// Meanwhile, XLookupString returns keysyms useful for unicode.
|
// Meanwhile, XLookupString returns keysyms useful for unicode.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue