mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
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)
|
||
|---|---|---|
| .. | ||
| sway | ||
| swaybar | ||
| swaynag | ||
| cairo_util.h | ||
| gesture.h | ||
| ipc-client.h | ||
| ipc.h | ||
| list.h | ||
| log.h | ||
| loop.h | ||
| meson.build | ||
| pango.h | ||
| pool-buffer.h | ||
| stringop.h | ||
| util.h | ||