From abb4f2c9655503f14dc55064f29c4f59b07e96ff Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 22 Feb 2018 08:05:13 +0100 Subject: 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 Reviewed-by: Daniel P. Berrangé Message-id: 20180222070513.8740-6-kraxel@redhat.com --- ui/curses.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/curses.c') diff --git a/ui/curses.c b/ui/curses.c index 479b77bd03..597e47fd4a 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -271,7 +271,8 @@ static void curses_refresh(DisplayChangeListener *dcl) keysym = chr; } - keycode = keysym2scancode(kbd_layout, keysym & KEYSYM_MASK); + keycode = keysym2scancode(kbd_layout, keysym & KEYSYM_MASK, + false, false, false); if (keycode == 0) continue; -- cgit v1.2.3-55-g7522