Repository navigation
wayland: match keybinds on every shift level of a key - #2228
Merged
flightlessmango merged 1 commit intoNov 23, 2026
Merged
flightlessmango merged 1 commit into
flightlessmango merged 1 commit into
Conversation
The pressed-key set stored the keysym for the current modifier state, so with Shift held "6" was recorded as "asciicircum" (or "ampersand" on other layouts) and toggle_hud=Shift_L+6 never fired. Releasing Shift before the key also erased a different keysym than the press added, leaving the shifted one stuck. Record each pressed key's keysyms at all levels, keyed by keycode, and drop that entry on release. X already accepts either name because it compares bindings by keycode. Fixes flightlessmango#2039
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2039.
On Wayland, a binding like
toggle_hud=Shift_L+6never fires. The key listener stored the keysym for the current modifiers, so with Shift held the 6 key was recorded asasciicircum(ampersandon some layouts), and releasing Shift first left that keysym stuck. Pressed keys now keep their keysyms at every level, per keycode, so either name matches, as it already does on X.Tested with native Wayland vkcube in a nested headless KWin, keys sent through its EIS input:
toggle_logging=Shift_L+6toggles logging on this branch in 3/3 runs, on master in 0/3, andShift_L+asciicircumstill works but no longer fires again on Shift alone.