diff options
-rw-r--r-- | include/sway/input/keyboard.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h index c9a8d514..e99a54b1 100644 --- a/include/sway/input/keyboard.h +++ b/include/sway/input/keyboard.h | |||
@@ -6,7 +6,20 @@ | |||
6 | #define SWAY_KEYBOARD_PRESSED_KEYS_CAP 32 | 6 | #define SWAY_KEYBOARD_PRESSED_KEYS_CAP 32 |
7 | 7 | ||
8 | struct sway_shortcut_state { | 8 | struct sway_shortcut_state { |
9 | /** | ||
10 | * A list of pressed key ids (either keysyms or keycodes), | ||
11 | * including duplicates when different keycodes produce the same key id. | ||
12 | * | ||
13 | * Each key id is associated with the keycode (in `pressed_keycodes`) | ||
14 | * whose press generated it, so that the key id can be removed on | ||
15 | * keycode release without recalculating the transient link between | ||
16 | * keycode and key id at the time of the key press. | ||
17 | */ | ||
9 | uint32_t pressed_keys[SWAY_KEYBOARD_PRESSED_KEYS_CAP]; | 18 | uint32_t pressed_keys[SWAY_KEYBOARD_PRESSED_KEYS_CAP]; |
19 | /** | ||
20 | * The list of keycodes associated to currently pressed key ids, | ||
21 | * including duplicates when a keycode generates multiple key ids. | ||
22 | */ | ||
10 | uint32_t pressed_keycodes[SWAY_KEYBOARD_PRESSED_KEYS_CAP]; | 23 | uint32_t pressed_keycodes[SWAY_KEYBOARD_PRESSED_KEYS_CAP]; |
11 | int last_key_index; | 24 | int last_key_index; |
12 | }; | 25 | }; |