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

Fix latch not broken by empty level #618

Merged

Conversation

wismill
Copy link
Member

@wismill wismill commented Jan 25, 2025

In essence empty levels are levels with just a NoSymbol keysym and a NoAction(), which breaks latches.

Fixes #613

TODO:

  • Add tests with multiple actions per level

CC @mahkoh

- Added a big bunch of tests for modifier latch. No yet exhaustive,
  but should cover the most usual use cases.
- Added missing test cases for breaking the group latch. Ideally, more
  tests should be added to match the coverage of modifiers latches.

WARNING: it is ambiguous what prevents a latch when multiple keys are
         *simultenously* operated together. We currently assuming that
         any action that is not identical to the considered latch
         prevents it.
@wismill wismill added bug Indicates an unexpected problem or unintended behavior state Indicates a need for improvements or additions to the xkb_state API labels Jan 25, 2025
@wismill wismill added this to the 1.8.0 milestone Jan 25, 2025
@wismill wismill requested review from whot and bluetech January 25, 2025 10:17
@wismill wismill mentioned this pull request Jan 25, 2025
In essence empty levels are levels with just a `NoSymbol` keysym and
a `NoAction()`, which breaks latches.

Fixed regression introduced in fdf2c52.

Added tests also for the case where the keycode is unknown.
@wismill wismill force-pushed the state/fix-latch-not-broken-by-empty-level branch from 4f927de to d424f16 Compare January 27, 2025 16:58
@wismill wismill merged commit af5704d into xkbcommon:master Jan 27, 2025
5 checks passed
@wismill wismill deleted the state/fix-latch-not-broken-by-empty-level branch January 27, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior state Indicates a need for improvements or additions to the xkb_state API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty levels should breaks latches
1 participant