Repository navigation
fix(hotkeys): Let the active scope decide before the match score - #306
Conversation
Chord dispatch chose the best match score first and the scope only among those, so scope precedence depended on the keyboard layout. A dialog Mod+S beat a global Mod+[KeyS] on US layouts but lost on Russian, where Mod+S matches through the key's position. Dispatch now picks the highest scope with a match, then the best score within it, then physical over logical, as the scopes docs describe.
🦋 Changeset detectedLatest commit: 660bcb4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🚀 Changeset Version Preview9 package(s) bumped directly, 9 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
@tanstack/alpine-hotkeys
@tanstack/angular-hotkeys
@tanstack/angular-hotkeys-devtools
@tanstack/ember-hotkeys
@tanstack/hotkeys
@tanstack/hotkeys-devtools
@tanstack/lit-hotkeys
@tanstack/octane-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/svelte-hotkeys-devtools
@tanstack/vue-hotkeys
@tanstack/vue-hotkeys-devtools
commit: |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
🎉 This PR has been released! Thank you for your contribution! |
🎯 Changes
dialogscope holdingMod+Sand a globalMod+[KeyS], the dialog won on a US layout (both score 3) but lost on Russian, whereMod+Smatches through the key's position (score 1) and the physical binding scores 3.#processChordsnow picks the highest scope with any match, then the best score within that scope, then the existing physical-over-logical rule. This is what the scopes guides and the defaults guide already describe.Mod+Ыand a dialogMod+S, a Russian Ctrl+ы fires the dialog hotkey.Bundle size
Brotli, from
size-limit. Base ismainat5cbaccf4.The other 13 entries are unchanged.
Notes
Sequences still rank by match score alone and have no scope precedence yet; that's a separate dispatch change.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit