summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar frsfnrrg <frsfnrrg@users.noreply.github.com>2018-06-01 17:04:58 -0400
committerLibravatar frsfnrrg <frsfnrrg@users.noreply.github.com>2018-06-01 18:52:36 -0400
commitc664d780cc9e7e8234cdaface63f8ff93e7ebfb2 (patch)
treec663e603c3fbb84ab81912b3203c7acc8fb01396 /include
parentRename check_shortcut_model to get_active_binding (diff)
downloadsway-c664d780cc9e7e8234cdaface63f8ff93e7ebfb2.tar.gz
sway-c664d780cc9e7e8234cdaface63f8ff93e7ebfb2.tar.zst
sway-c664d780cc9e7e8234cdaface63f8ff93e7ebfb2.zip
Comment to explain sway_shortcut_state lists
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/keyboard.h13
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
8struct sway_shortcut_state { 8struct 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};