diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-22 10:28:14 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-05 10:45:44 +0100 |
commit | 19c1b9fd3dd5955893c0d3c187a4180313e9a0f1 (patch) | |
tree | 39b304518869487cd9ca826b5c38c9b5fbdb6cff /ui/curses.c | |
parent | 4ed26e19d90bf5a4ea5662118ae5a2af46e61d36 (diff) |
keymap: fix keyup mappings
It is possible that the modifier state on keyup is different from the
modifier state on keydown. In that case the keycode lookup can end up
with different keys in case multiple keysym -> keycode mappings exist,
because it picks the mapping depending on modifier state.
To fix that change the lookup logic for keyup events. Instead of
looking at the modifier state check the key state and prefer a keycodes
where the key is in "down" state right now.
Fixes: abb4f2c965 keymap: consider modifier state when picking a mapping
Buglink: https://bugs.launchpad.net/bugs/1738283
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1658676
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20190122092814.14919-9-kraxel@redhat.com
Diffstat (limited to 'ui/curses.c')
-rw-r--r-- | ui/curses.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/curses.c b/ui/curses.c index 54687589d4..6e0091c3b2 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -273,7 +273,7 @@ static void curses_refresh(DisplayChangeListener *dcl) } keycode = keysym2scancode(kbd_layout, keysym & KEYSYM_MASK, - NULL); + NULL, false); if (keycode == 0) continue; |