diff options
Diffstat (limited to 'ui/keymaps.c')
-rw-r--r-- | ui/keymaps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/keymaps.c b/ui/keymaps.c index 6e44f738ed..c8b2135340 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -188,7 +188,7 @@ kbd_layout_t *init_keyboard_layout(const name2keysym_t *table, int keysym2scancode(kbd_layout_t *k, int keysym, - bool shift, bool altgr, bool ctrl) + QKbdState *kbd) { static const uint32_t mask = SCANCODE_SHIFT | SCANCODE_ALTGR | SCANCODE_CTRL; @@ -220,13 +220,13 @@ int keysym2scancode(kbd_layout_t *k, int keysym, * If so, prefer that one. */ mods = 0; - if (shift) { + if (kbd && qkbd_state_modifier_get(kbd, QKBD_MOD_SHIFT)) { mods |= SCANCODE_SHIFT; } - if (altgr) { + if (kbd && qkbd_state_modifier_get(kbd, QKBD_MOD_ALTGR)) { mods |= SCANCODE_ALTGR; } - if (ctrl) { + if (kbd && qkbd_state_modifier_get(kbd, QKBD_MOD_CTRL)) { mods |= SCANCODE_CTRL; } |