fix(viewer): don't fire the modifier-chord release hotkey mid-shortcut - #3
Open
Phaengris wants to merge 1 commit into
Open
fix(viewer): don't fire the modifier-chord release hotkey mid-shortcut#3Phaengris wants to merge 1 commit into
Phaengris wants to merge 1 commit into
Conversation
The default release-cursor binding (Ctrl+Alt) fired the moment the chord was completed on key PRESS — making it the prefix of every Ctrl+Alt+<key> guest shortcut: the grab dropped mid-combo, the remaining key went nowhere, and keyboard input appeared frozen until a click re-armed the grab. Modifier-only chords now arm on press and fire only when a chord key is RELEASED with no other key pressed in between (virt-viewer semantics); key+modifier bindings keep firing on press. Also add a modifier reconciliation net: when GTK's modifier state shows a modifier is up but we still track it as pressed (its release event was lost to grab churn or compositor focus flicker), release it in the guest instead of leaving it stuck repeating the last chord.
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.
Standalone bugfix off
main, independent of #1/#2 (the same commit rides along in #2; whichever lands first, I'll rebase the other).The bug: the default release-cursor binding (Ctrl+Alt) fires the moment the chord is completed on key press — making it the prefix of every
Ctrl+Alt+<key>guest shortcut. Pressing e.g. Ctrl+Alt+Arrow (tmux pane splitting) drops the grab mid-combo: the remaining key goes nowhere and keyboard input appears frozen until a click re-arms the grab. Repeated combos can also lose release events, leaving the guest with a stuck modifier that autorepeats the last chord.The fix:
Ctrl+Alt+<key>shortcuts pass through to the guest; a deliberate press-and-release of the bare chord still releases the grab. Key+modifier bindings (e.g.release-cursor=ctrl+q) keep firing on press.cargo fmt --checkclean,cargo test --offlinepasses (52 tests, 2 new).🤖 Generated with Claude Code