Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
SaKaNa-Y
marked this pull request as ready for review
September 25, 2026 03:08
◈ PR Lens
Architecture 1 component touched across 4 lanes. Data flow No data-flow sequence changed in this PR. View
Tip Click the link under each diagram to open it on a canvas you can zoom, pan and step through 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
Author
|
This change removes interference from existing shortcuts when adding a new shortcut. |
antfu
approved these changes
Sep 25, 2026
This branch was previously deployed
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.
Important
Please take a moment to read this. Thank you!
I should include a brief explanation of the problem in my own words in every PR. If that explanation is missing, please @mention me and do not merge this PR until I have added it. You may also leave this PR unaddressed (because this means I have not fulfilled my responsibilities as the author).
If my explanation is unclear or difficult to follow, please ask me to clarify or provide reproduction steps or supporting evidence.
I welcome suggestions and counterarguments, especially questions about anything I may have overlooked. (Your feedback helps me learn and improve. 🙏)
I hold myself to this standard for every PR, regardless of its size.
Summary
When editing a shortcut, pressing an already-bound combination executes its command before the recorder can receive it. For example, edit Toggle Command Palette, record Cmd+Shift+J without saving, then press its original Cmd+K: the palette opens and the recorder retains Cmd+Shift+J. This also happens when editing the command's own binding, so it does not depend on duplicate assignments.
The window capture listener stops propagation before the input's keydown handler runs. Skip command execution when the event's composed path contains the shortcut recorder. This reaches inputs inside shadow roots and avoids realm-specific element checks for popup windows.
Shortcut conflict warnings and saving behavior are unchanged.
Evidence
pnpm lintandpnpm knippassed.pnpm test --run: 142 test files passed; 1572 tests passed, 9 skipped.pnpm typecheck: 40 tasks passed.pnpm build: 28 tasks passed, using cached outputs on the final run after the test command's build.Merge Danger
Door: two-way; no persisted data or API changes.
Blast Radius: shortcut recording. The early return applies only to events whose composed path contains the recorder's existing class.