keymap: consider modifier state when picking a mapping
Pass the modifier state to the keymap lookup function. In case multiple
keysym -> keycode mappings exist look at the modifier state and prefer
the mapping where the modifier state matches.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20180222070513.8740-6-kraxel@redhat.com
diff --git a/ui/curses.c b/ui/curses.c
index 479b77b..597e47f 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -271,7 +271,8 @@
keysym = chr;
}
- keycode = keysym2scancode(kbd_layout, keysym & KEYSYM_MASK);
+ keycode = keysym2scancode(kbd_layout, keysym & KEYSYM_MASK,
+ false, false, false);
if (keycode == 0)
continue;