aboutsummaryrefslogtreecommitdiff
path: root/ui/keymaps.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-02-22 08:05:13 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-02-22 10:35:32 +0100
commitabb4f2c9655503f14dc55064f29c4f59b07e96ff (patch)
tree2de1661b57cc82aeb53d21aeac9e1c1a54dafd87 /ui/keymaps.h
parent23ad24e48cf28ac2542ade657efbf7f802d7c8a0 (diff)
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
Diffstat (limited to 'ui/keymaps.h')
-rw-r--r--ui/keymaps.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/keymaps.h b/ui/keymaps.h
index 17ec03387a..0693588225 100644
--- a/ui/keymaps.h
+++ b/ui/keymaps.h
@@ -54,7 +54,8 @@ typedef struct kbd_layout_t kbd_layout_t;
kbd_layout_t *init_keyboard_layout(const name2keysym_t *table,
const char *language);
-int keysym2scancode(kbd_layout_t *k, int keysym);
+int keysym2scancode(kbd_layout_t *k, int keysym,
+ bool shift, bool altgr, bool ctrl);
int keycode_is_keypad(kbd_layout_t *k, int keycode);
int keysym_is_numlock(kbd_layout_t *k, int keysym);