fix(key-bindings): Handle overlapping key bindings correctly#2178
Merged
rkaraivanov merged 1 commit intomasterfrom Apr 7, 2026
Merged
fix(key-bindings): Handle overlapping key bindings correctly#2178rkaraivanov merged 1 commit intomasterfrom
rkaraivanov merged 1 commit intomasterfrom
Conversation
- When multiple keys are pressed in quick succession, it's possible for their keydown events to overlap before the corresponding keyup events fire. This can lead to incorrect binding matches if the logic doesn't account for the current state of pressed keys. The fix involves ensuring that the key event handling logic correctly identifies which keys are currently pressed and matches them against the defined bindings, even when overlaps occur. - Additionally, the skip logic is improved to prevent keys from getting stuck if the skip condition changes between keydown and keyup events.
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.
Description
The fix involves ensuring that the key event handling logic correctly identifies which keys are currently pressed and matches them against the defined bindings, even when overlaps occur.
Type of Change
Testing
Added a test scenario covering the issue.
Checklist