Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input/keyboard: fix bindsym --to-code failing on duplicates #8339

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Sep 15, 2024

  1. 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)
    sahinf committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    052d905 View commit details
    Browse the repository at this point in the history
  2. formatting

    sahinf committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    e464128 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. formatting

    sahinf committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    98bb2c8 View commit details
    Browse the repository at this point in the history