diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2019-08-23 23:34:02 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2019-08-23 23:34:02 +0100 |
commit | 9e1d6e24a028ec96fb11ba943769764665fb024c (patch) | |
tree | 50eaaf19bbff64e6309ebe8c2b1ab1c4b58f3df9 /src/keyboard.c | |
parent | 9850d9c6a2be489a912ff3c98c83eef77198fccc (diff) | |
download | imv-9e1d6e24a028ec96fb11ba943769764665fb024c.tar.gz |
wl_window: Maintain keyboard modifiers state
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index af79006..55e4e49 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -55,6 +55,12 @@ void imv_keyboard_update_key(struct imv_keyboard *keyboard, int scancode, bool p xkb_state_update_key(keyboard->state, scancode + scancode_offset, pressed ? XKB_KEY_DOWN : XKB_KEY_UP); } +void imv_keyboard_update_mods(struct imv_keyboard *keyboard, + int depressed, int latched, int locked) +{ + xkb_state_update_mask(keyboard->state, depressed, latched, locked, 0, 0, 0); +} + static const char *describe_prefix(struct imv_keyboard *keyboard) { const bool ctrl = (xkb_state_mod_name_is_active(keyboard->state, XKB_MOD_NAME_CTRL, XKB_STATE_MODS_EFFECTIVE) > 0); |