fix: recover held modifiers after missed keyup events - #161
Draft
KevinVandy wants to merge 2 commits into
Draft
KevinVandy wants to merge 2 commits into
KevinVandy wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
🚀 Changeset Version Preview1 package(s) bumped directly, 12 bumped as dependents. 🟩 Patch bumps
|
@tanstack/angular-hotkeys
@tanstack/hotkeys
@tanstack/hotkeys-devtools
@tanstack/lit-hotkeys
@tanstack/preact-hotkeys
@tanstack/preact-hotkeys-devtools
@tanstack/react-hotkeys
@tanstack/react-hotkeys-devtools
@tanstack/solid-hotkeys
@tanstack/solid-hotkeys-devtools
@tanstack/svelte-hotkeys
@tanstack/vue-hotkeys
@tanstack/vue-hotkeys-devtools
commit: |
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.
🎯 Changes
Recover held Control, Alt, Shift, and Meta state when a system shortcut or browser tool swallows
keyupwithout blurring the page. Later keyboard events, mouse movement, and mouse button presses remove modifiers whose event flags report that they are no longer active. Active modifiers and both physical modifier keys remain tracked; unchanged mouse events do not notify subscribers.Related to #143 and #66. Recovery still requires another input event or blur; it does not infer a release from elapsed time. The missing-event sequence is reproduced in tests, but the exact native macOS screenshot and DevTools shortcuts have not been verified. Keep this PR in draft pending that browser validation.
Adds regressions for all four modifiers, dual-key holds, code-less keys, repeated events, listener cleanup and React
useKeyHold, plus documentation and a patch changeset. Targeted validation: 616 core tests and 5 React recovery/hint tests passed; core/React types, core lint and core build passed.pnpm testandpnpm run test:prpassed, including all 152 Nx tasks; the package is 10.46 kB against its 12 kB size limit.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact