aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-09-14 21:22:21 -0500
committerFurkan Sahin <furkan-dev@proton.me>2024-09-14 21:22:21 -0500
commitf7233302062e60be8608f14f16ab07be248572c4 (patch)
tree766d9edd690e01ce1e50261b491c0f27d0779c2c /include
parent8d4ed82d9b356542667bdcbaba2acd4ea7923578 (diff)
config/bindings: Extend bindsym --to-code to additionally
handle the case in which a given keysym maps to more than one keycode. Sometimes, a keysym can map to duplicate keycodes and `libxkbcommon` does not prohibit this. In that case, it makes sense to find all the keycodes that map to the keysym. - Merges translate_binding into translate_keysyms, simplify logic - Changes add_matching_keycodes to find ALL keycodes, not just last - Removes unncessary list_t* syms. It's only used to alias keys as "syms". No other purpose. This commit also introduces a recursive cartesian product calculator in order to handle any cases. `bindsym --to-code (M + .. + N)` s.t. Keysym M maps to keycodes { M_0 .. M_m } ... Keysym N maps to keycodes { N_0 .. N_n } results in || M x .. x N || bindings (cartesian product)
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index bb770c6f..f09ca594 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -62,7 +62,6 @@ struct sway_binding {
char *input;
uint32_t flags;
list_t *keys; // sorted in ascending order
- list_t *syms; // sorted in ascending order; NULL if BINDING_CODE is not set
uint32_t modifiers;
xkb_layout_index_t group;
char *command;