diff options
| author | Stacy Harper <contact@stacyharper.net> | 2021-08-23 16:36:11 +0200 |
|---|---|---|
| committer | John Sullivan <jsullivan@csumb.edu> | 2021-10-19 23:12:01 -0700 |
| commit | 71b812cb31720816bd73093c02e7dc17a0c49daf (patch) | |
| tree | 120100ff73cbd442889444293303de9c278773bd /keyboard.h | |
| parent | 18cd43074d07fceb2819ec8f5f7392510658082f (diff) | |
| download | suggpicker-71b812cb31720816bd73093c02e7dc17a0c49daf.tar.gz | |
Simplest key_mood
Diffstat (limited to 'keyboard.h')
| -rw-r--r-- | keyboard.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/keyboard.h b/keyboard.h index 7f58b0d..10038cf 100644 --- a/keyboard.h +++ b/keyboard.h @@ -167,12 +167,11 @@ kbd_unpress_key(struct kbd *kb, uint32_t time) { void kbd_press_key(struct kbd *kb, struct key *k, uint32_t time) { - uint8_t mods_before; switch (k->type) { case Code: if (k->code_mod) { - mods_before = kb->mods; - kb->mods = k->code_mod; + zwp_virtual_keyboard_v1_modifiers(kb->vkbd, k->code_mod, 0, 0, 0); + } else { zwp_virtual_keyboard_v1_modifiers(kb->vkbd, kb->mods, 0, 0, 0); } if (compose == 1) { @@ -195,10 +194,6 @@ kbd_press_key(struct kbd *kb, struct key *k, uint32_t time) { compose++; } } - if (k->code_mod) { - kb->mods = mods_before; - zwp_virtual_keyboard_v1_modifiers(kb->vkbd, kb->mods, 0, 0, 0); - } break; case Mod: kb->mods ^= k->code; |
