From 71c368fcfd0162d87ae0003073b25de58a42b419 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Fri, 20 Nov 2026 23:59:47 -0600 Subject: [PATCH 1/6] fix(hotkeys): Leave digit-row zoom keys to the browser, and keep sequences going across CapsLock and dead keys AZERTY types `-` on the 6 key, so Ctrl+- fired `Mod+6` through the digit-row fallback and the browser never zoomed out. Czech Ctrl++ on the 1 key fired `Mod+1` the same way. A digit-row key that types `-`, `+`, or `=` with Control alone, or Command alone on macOS, no longer stands in for its digit. Presses with Shift, Alt, or another modifier still fall back, so AZERTY Ctrl+Shift+6 fires `Mod+6` and German Ctrl+Shift+0 (`=`) fires `Mod+Shift+0`. A CapsLock, NumLock, ScrollLock, Fn, FnLock, or dead-key event between steps reset a sequence. These keys now count only when they match a step, in the manager and in `createSequenceMatcher`. The progress reset timer runs from the last step, so such a key doesn't extend it. --- .changeset/digit-row-zoom-keys.md | 5 + .changeset/sequence-lock-and-dead-keys.md | 5 + .intent/review-state.json | 377 ++++++++---------- docs/framework/alpine/guides/sequences.md | 1 + docs/framework/angular/guides/sequences.md | 1 + docs/framework/ember/guides/sequences.md | 1 + docs/framework/lit/guides/sequences.md | 1 + docs/framework/octane/guides/sequences.md | 1 + docs/framework/preact/guides/sequences.md | 1 + docs/framework/react/guides/sequences.md | 1 + docs/framework/solid/guides/sequences.md | 1 + docs/framework/svelte/guides/sequences.md | 1 + docs/framework/vue/guides/sequences.md | 1 + docs/guides/sensible-defaults.md | 3 +- docs/reference/classes/HotkeyManager.md | 10 +- docs/reference/functions/areHotkeysEqual.md | 2 +- .../functions/createHotkeyChordHandler.md | 2 +- .../createMultiHotkeyChordHandler.md | 2 +- .../functions/createSequenceMatcher.md | 6 +- docs/reference/functions/getHotkeyManager.md | 2 +- .../functions/matchesKeyboardEvent.md | 8 +- .../CreateHotkeyChordHandlerOptions.md | 8 +- .../type-aliases/MultiHotkeyChordHandler.md | 2 +- .../variables/DEFAULT_SEQUENCE_TIMEOUT.md | 2 +- e2e/layouts/layouts.spec.ts | 17 +- e2e/support/x11.ts | 2 + packages/hotkeys/src/_keyboard-event.ts | 8 + packages/hotkeys/src/_match.ts | 11 +- packages/hotkeys/src/hotkey-manager.ts | 12 +- packages/hotkeys/src/match.ts | 14 +- packages/hotkeys/tests/hotkey-manager.test.ts | 15 + packages/hotkeys/tests/match.test.ts | 122 ++++++ .../hotkeys/tests/sequence-manager.test.ts | 109 +++++ 33 files changed, 519 insertions(+), 235 deletions(-) create mode 100644 .changeset/digit-row-zoom-keys.md create mode 100644 .changeset/sequence-lock-and-dead-keys.md diff --git a/.changeset/digit-row-zoom-keys.md b/.changeset/digit-row-zoom-keys.md new file mode 100644 index 000000000..6e3d5bfcf --- /dev/null +++ b/.changeset/digit-row-zoom-keys.md @@ -0,0 +1,5 @@ +--- +'@tanstack/hotkeys': patch +--- + +Control alone, or Command alone on macOS, with a digit-row key that types `-`, `+`, or `=` no longer fires the digit's hotkey. AZERTY types `-` on the 6 key, so Ctrl+- fired `Mod+6` and stopped the browser from zooming out. Czech and Slovak Ctrl++ on the 1 key fired `Mod+1` the same way. These presses now reach the browser. `Mod+6` still fires on AZERTY with Ctrl+Shift+6, which types `6`, and as `Mod+[Digit6]`. Presses with another modifier still fall back, so German Ctrl+Shift+0 (`=`) still fires `Mod+Shift+0`. diff --git a/.changeset/sequence-lock-and-dead-keys.md b/.changeset/sequence-lock-and-dead-keys.md new file mode 100644 index 000000000..03b02b5ad --- /dev/null +++ b/.changeset/sequence-lock-and-dead-keys.md @@ -0,0 +1,5 @@ +--- +'@tanstack/hotkeys': patch +--- + +CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. A dead key types its character together with the next key, and that key decides whether the sequence goes on. diff --git a/.intent/review-state.json b/.intent/review-state.json index fef43ff7a..e11e8438f 100644 --- a/.intent/review-state.json +++ b/.intent/review-state.json @@ -94,17 +94,17 @@ ] }, "skill:packages/hotkeys/skills/hotkeys-core/SKILL.md": { - "fingerprint": "329e12a2b33637aee3e32513dd8271bdd67a8eae691bd475faf1ec403edacb0c", + "fingerprint": "e45a5358aaf5266892afa4be7c170ce79e38a01d55f32b01d6cb46f4d7b87e3e", "snapshot": { "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "43ca2c7dc69c19f840e0bafe05b86c8953dd0f7e0213b1f7231cbb69f53eaaf3", - "docs/guides/sensible-defaults.md": "304a97befbe9307fccbf15c8b137b73f26640b356d7c93b3bf93e415a83bcc8e", + "docs/framework/react/guides/sequences.md": "d7bc646a409fa803dde08c6a51a10423e938bea6430c6b9fad454f7efa3f750c", + "docs/guides/sensible-defaults.md": "1018366d533d139324f6119cfe15c9bbab164912a63f4eb94dd0da3123189891", "packages/hotkeys/skills/hotkeys-core/SKILL.md": "2713cc5a05ecd000e9dbfacfd79192ad7b87bb80fdf54ddc8c1f50b90015a60c", "packages/hotkeys/skills/hotkeys-core/references/scopes.md": "1ae616ff7ce92d9679bbd0752ada572c2060c33ea7e7e638bfcc9d5425ac6bfa", "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", - "packages/hotkeys/src/hotkey-manager.ts": "8895b2113fc97aef525a15b0fb3f1a28816280b894c1b754c6141ad9ea7a73cd", - "packages/hotkeys/src/match.ts": "8aac0132981977ab03b52af1a0f3384c1808ab7d8f55a6d637aff2d353deac2e", + "packages/hotkeys/src/hotkey-manager.ts": "3fb485c2c73a32ebca611e2c05aeb4bb6d9ff245ef8f9dec9c7b1304ae7e4c57", + "packages/hotkeys/src/match.ts": "6526a4efc625764a43b05db7df035e7fe38711f3e07ebd45be06c0d5dcc29786", "packages/react-hotkeys/tests/skills/editor-shortcuts/editor-shortcuts.test.tsx": "73411ec7c25652244ed31ad4120880dfc08d6e10af959bef04d2df5360769fde", "packages/react-hotkeys/tests/skills/editor-shortcuts/fixture.tsx": "613a833bb6412b600925deb4009d16cfbfe7afa9a5dc0b82d1a39b8da8c0230b", "packages/react-hotkeys/tests/skills/editor-shortcuts/grade.tsx": "abb8c54f80f8f64bc55dbf9082ac2275aea03d5626437c3366bd8393463cdb1c", @@ -115,11 +115,11 @@ "packages/react-hotkeys/tests/skills/editor-shortcuts/solution.tsx": "ec81379bf0e3a9950222cf8525f82f8abefeb6b46339550fd3a8622e61bf4f0d", "packages/react-hotkeys/tests/skills/editor-shortcuts/task.md": "9610d80e7add59f0433cbf210562ff8c481dc2c14371ce31c00a329d9ff1fedf" }, - "head": "a7c7ddcf89fac99790eb60372fc440fcc34f1b07", - "outcome": "updated", - "reason": "Added a pitfall: keys of other layouts need a `keys` registration on Register, which changes types only; keep UsKeys, prefer US bindings for shared shortcuts.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: pitfall \"Keys of other layouts need a registration\"" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "skill:packages/lit-hotkeys/skills/lit-hotkeys/SKILL.md": { @@ -277,7 +277,7 @@ ] }, "planning:_artifacts": { - "fingerprint": "c01766d18f4f5517172ccb8405b55ccfcf66397cbc475d196c1f1587eb205bec", + "fingerprint": "0662a509e6fb6345753fa72913c94e1969f594d6d2bdcc7fa6b25b2398d869f2", "snapshot": { "_artifacts/domain_map.yaml": "9020ca258eebcb3575acad17ed5fc62d53306d6e07d6dc6456c006fd8f05f94b", "_artifacts/skill_spec.md": "3dfe15cd5f88bff08bfe9492e7487f709fcec25af7576a7e81729433e6d1ebef", @@ -299,7 +299,7 @@ "docs/framework/react/guides/custom-hotkey-recording.md": "b391a5b8f4186abb861e55d4ac592cd63d290d8f38f6f2efdae2bab07f34f4a0", "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "43ca2c7dc69c19f840e0bafe05b86c8953dd0f7e0213b1f7231cbb69f53eaaf3", + "docs/framework/react/guides/sequences.md": "d7bc646a409fa803dde08c6a51a10423e938bea6430c6b9fad454f7efa3f750c", "docs/framework/react/quick-start.md": "7bb88df3ccd9454127c41892d49317a4bd362e73e3bea50f9a339e00d342c4cc", "docs/framework/solid/guides/hotkeys-provider-and-scopes.md": "693ce66cace245cedc9a4dc4403766e8219abe07b51ac040208bb9acce9da4af", "docs/framework/solid/quick-start.md": "fef5577f2da3e25d3b202a4ce51d770ea55033e67eb5fdfa1d516d157658d394", @@ -307,7 +307,7 @@ "docs/framework/svelte/quick-start.md": "d84e2d8ad51c77abfa3eb8e0e920890b5301f93f0ba8f735c0588d266953d8b1", "docs/framework/vue/guides/hotkeys-provider-and-scopes.md": "0d9807ea50c5e85164b26fa7c9298c16a92b0b7d0e8bc08413e070c00241ef8c", "docs/framework/vue/quick-start.md": "36f2dd86551b0a08b33f7c439720027241a76d6e73aed60602fbee3f5c3d2782", - "docs/guides/sensible-defaults.md": "304a97befbe9307fccbf15c8b137b73f26640b356d7c93b3bf93e415a83bcc8e", + "docs/guides/sensible-defaults.md": "1018366d533d139324f6119cfe15c9bbab164912a63f4eb94dd0da3123189891", "packages/alpine-hotkeys/skills/alpine-hotkeys/SKILL.md": "6e1357a1219003b43fa74242cb5671ab0aaf5c3ffd24dcad00f571f1bd829004", "packages/alpine-hotkeys/skills/alpine-hotkeys/references/app-hotkeys.md": "0fb12f409b5aec0999df3799f86d116b24d4d4d00131041e63d59264a7af1c98", "packages/alpine-hotkeys/src/createAppHotkeys.ts": "4b3745b96bdbf7971347bd930b9525b740abfffbd72dfed556d36cc0cbfa6757", @@ -340,9 +340,9 @@ "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", "packages/hotkeys/src/app-hotkeys.ts": "45b453c61aa4a762ad3f92fcb4f4fe0cb0dd636e8dc2f232f2a4fe4663159a3c", "packages/hotkeys/src/conflicts.ts": "005f63fdfa139d51203306ef9b3fb83ebf76ddd22553162a5262827a5e9d0921", - "packages/hotkeys/src/hotkey-manager.ts": "8895b2113fc97aef525a15b0fb3f1a28816280b894c1b754c6141ad9ea7a73cd", + "packages/hotkeys/src/hotkey-manager.ts": "3fb485c2c73a32ebca611e2c05aeb4bb6d9ff245ef8f9dec9c7b1304ae7e4c57", "packages/hotkeys/src/hotkey-recorder.ts": "dc53d33da84311cf851a8c51721fb5be892b008942a084c5ef301c9797f17d11", - "packages/hotkeys/src/match.ts": "8aac0132981977ab03b52af1a0f3384c1808ab7d8f55a6d637aff2d353deac2e", + "packages/hotkeys/src/match.ts": "6526a4efc625764a43b05db7df035e7fe38711f3e07ebd45be06c0d5dcc29786", "packages/lit-hotkeys/skills/lit-hotkeys/SKILL.md": "2abef2d5efb7887b8737e661722eb3b5aa80f117666ac13e12c35a0de1c422af", "packages/lit-hotkeys/skills/lit-hotkeys/references/app-hotkeys.md": "3c5b805f628d0b14361e43944283f3b7271362cc5831def6406e677ce21f2678", "packages/lit-hotkeys/src/controllers/app-hotkeys.ts": "b597a0682f4b4168794cef6a0f3f512649b01cd1796d059e220d73bee58968a4", @@ -408,11 +408,11 @@ "packages/vue-hotkeys/src/useHotkeyRecorder.ts": "20040667eec1bf86303fb6738985749c0db2f38db67fd9c34dd9ec1f52306899", "packages/vue-hotkeys/src/useHotkeys.ts": "a01bedb627cd6cad884cf59b2077c33b34289589e6a101fefb5ca1709dabb668" }, - "head": "a7c7ddcf89fac99790eb60372fc440fcc34f1b07", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", "outcome": "no-change", - "reason": "The planning record covers app hotkeys and core guidance; the layout key types are covered by the hotkeys-core pitfall, so no planning change is needed.", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: pitfall \"Keys of other layouts need a registration\"" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:.changeset/intent-skills.md": { @@ -685,28 +685,24 @@ ] }, "source:docs/reference/classes/HotkeyManager.md": { - "fingerprint": "dccbd3d7287ecedb3d233bd0ec1991dac8588a8b5968e71690e8978a12b081fa", + "fingerprint": "72723af77e2b7cdad65f5da3a609f1467d02b129b141a1dbf5e861918779c87a", "snapshot": { - "docs/reference/classes/HotkeyManager.md": "81dbc0db123446fb5da43f1b5fb197a02549eeaa2fc09f81b2cc4051e89063f4" + "docs/reference/classes/HotkeyManager.md": "6537cb6f57a95ae056d043e8b853fa572238a1161b3fb526ea07d5c815f563d4" }, - "head": "efe7e236d81f4906c0bcd4d0a0ac7a7e9bf9d2bb", - "outcome": "no-change", - "reason": "Core register now skips a null target. The hotkeys-core skill and its references do not describe the target option for direct register calls, so no guidance changes. Manager guides got one bullet each, and the reference pages changed only for the target JSDoc and shifted line numbers.", - "evidence": [ - "Changed: docs/reference/classes/HotkeyManager.md at efe7e236d81f4906c0bcd4d0a0ac7a7e9bf9d2bb" - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/functions/getHotkeyManager.md": { - "fingerprint": "b437d4d522bbcf6b272db82d4dde23d68ac2e49f768c0070364081811d47bf13", + "fingerprint": "d31e773ff6917694746d562aa9b86dfab6a9bb481c935ef2beeaaa900ab80934", "snapshot": { - "docs/reference/functions/getHotkeyManager.md": "d0c1bbd7a470f3b059ff28522962dfcdbcbc924fe9a5c17ae1fcd1bd360290f0" + "docs/reference/functions/getHotkeyManager.md": "7e4a7d870d5837241c65057953482f9bcfe4538e369dd60dc7a94b68b82ae0a5" }, - "head": "efe7e236d81f4906c0bcd4d0a0ac7a7e9bf9d2bb", - "outcome": "no-change", - "reason": "Core register now skips a null target. The hotkeys-core skill and its references do not describe the target option for direct register calls, so no guidance changes. Manager guides got one bullet each, and the reference pages changed only for the target JSDoc and shifted line numbers.", - "evidence": [ - "Changed: docs/reference/functions/getHotkeyManager.md at efe7e236d81f4906c0bcd4d0a0ac7a7e9bf9d2bb" - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:examples/alpine/kitchen-sink/index.html": { "fingerprint": "e5b115fc55083a836a5c968897c08a904b2db84bded413a3c85b9fb203b8a1e0", @@ -1459,16 +1455,14 @@ ] }, "source:packages/hotkeys/tests/hotkey-manager.test.ts": { - "fingerprint": "51b726825767eb17f5ef4f83605c3a71bbfe0f27eb5442923d726faf818e56c4", + "fingerprint": "4ec2e463ee11b9182fc4fd9a6fa708d4122c7085b62be8d8fb139eac0016cd53", "snapshot": { - "packages/hotkeys/tests/hotkey-manager.test.ts": "aa116a8c66f3ed74be9442421f9eaaf714482e711fe985d7a92cd3b0a17be681" + "packages/hotkeys/tests/hotkey-manager.test.ts": "99b178a91ede18895c6fb623668629a5172c461d66bfc343e03a7b5a8435a9ca" }, - "head": "efe7e236d81f4906c0bcd4d0a0ac7a7e9bf9d2bb", - "outcome": "no-change", - "reason": "Core register now skips a null target. The hotkeys-core skill and its references do not describe the target option for direct register calls, so no guidance changes. Manager guides got one bullet each, and the reference pages changed only for the target JSDoc and shifted line numbers.", - "evidence": [ - "Changed: packages/hotkeys/tests/hotkey-manager.test.ts at efe7e236d81f4906c0bcd4d0a0ac7a7e9bf9d2bb" - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/framework/alpine/guides/cheat-sheet-ui-helpers.md": { "fingerprint": "6aaa3a1382d0c2e991962011a46c4f3078a4ccafec43e7b41d8dd9ed143fe15b", @@ -4382,48 +4376,46 @@ ] }, "source:e2e/layouts/layouts.spec.ts": { - "fingerprint": "106b2ddb363a374b250ad6331a48dc5ae8061df355e2538c95b9d34f7de7dfd9", + "fingerprint": "b5773a69a45e025ca3bdd6e7150171312111834148aad44b17c24fa23dcc036e", "snapshot": { - "e2e/layouts/layouts.spec.ts": "40403f7a38bd0e95e447a2859ec39f77fdf3cae6bcc9d1650e75c3be63ce19dc" + "e2e/layouts/layouts.spec.ts": "d6abbca0129566558f0428f8711dcdcc0d9fc342d1e36aea18a362a2fb579f66" }, - "head": "94358d54fd72a38952b6fb68560b48043a3f8277", - "outcome": "no-change", - "reason": "Tests for the recorder's new default and the conflict check context. Skills don't describe the test suites.", - "evidence": ["e2e/layouts/layouts.spec.ts"] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:e2e/support/x11.ts": { - "fingerprint": "e527cbaa738a27ba515464032beba72a7c0600d4ddc33271a19f2cbe888fb06c", + "fingerprint": "486f65af92474ee41478465f79bb981ecd6bac273ff4f25424c1aefee861d356", "snapshot": { - "e2e/support/x11.ts": "77592cb2653ab0cd417559e79b11e0b066b6e82f0d382ee9f3cbe036c8cf28c4" + "e2e/support/x11.ts": "76fe3c1917babec335ddad5dc199ace59a37d7a1f5ea0fd5b696d345b3ce3c6d" }, - "head": "294209fa015daf110ab4812b333800a9cb0fb802", - "outcome": "no-change", - "reason": "Test support only: the layout suite closes its helper window when the wait for it fails. No library behavior or guidance changes.", - "evidence": ["e2e/support/x11.ts", "git diff HEAD -- e2e/support/x11.ts"] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:packages/hotkeys/src/_match.ts": { - "fingerprint": "782d1638fb90d30c65f203051adf3a72d9b1bf2e7991ea217ef84d209cf51845", + "fingerprint": "9d330caee48ffc68a8a395103d5f2bd2fabb4eadd66987b941c77da7399b9b23", "snapshot": { - "packages/hotkeys/src/_match.ts": "aefa582da72d237d70cbf3a7283f5898e4c752219f512d2ceb99f0c44c3273f9" + "packages/hotkeys/src/_match.ts": "8099305db8c69426c901a32e24ceefb7da4bb9756356025bafd1d1fc3885ab0b" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:packages/hotkeys/tests/match.test.ts": { - "fingerprint": "6e5b60c024a1901ed577a779b522eb0d015efe52fc17434bc403a702fc71393c", + "fingerprint": "8ab197b2197b6cd2a340204abc01b7676548c5fa3324bed35cc88e9184ae7990", "snapshot": { - "packages/hotkeys/tests/match.test.ts": "c2d8ea2cc7d8eb526bf5c40ead8ec3f722394eec22c3d03ff8da37a726a1b5ab" + "packages/hotkeys/tests/match.test.ts": "7e737eca223874b927d618760b9723445b4ff4595da80b15393e50cd475aa64a" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:packages/hotkeys/tests/sequence-regressions.test.ts": { "fingerprint": "7fc444c0c86d281425e7a71df8d2acce649d69e855bf0b3b43db276139528489", @@ -6775,15 +6767,15 @@ ] }, "source:packages/hotkeys/src/_keyboard-event.ts": { - "fingerprint": "7df1032396ae35c79ae9de93f66a47c52cc0d737a8bdf4b7159fe15dcda57fdd", + "fingerprint": "9ea4ec6b67926373f78804aeffdef35d216cf80b4564390f4e93b6a566442197", "snapshot": { - "packages/hotkeys/src/_keyboard-event.ts": "e0ff19bc5bd70752b6863229cf2b6e8b23031cbea4b96863944853b1072f59fa" + "packages/hotkeys/src/_keyboard-event.ts": "bffd1a390f7d519e0ffdad1a79d0bb702badcef3991fd3e395019189324f4a02" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:packages/hotkeys/src/format.ts": { @@ -6924,16 +6916,14 @@ ] }, "source:packages/hotkeys/tests/sequence-manager.test.ts": { - "fingerprint": "141aadd925267f7bbdacc87ceb8763b9baa947e3da57b1c3da245fd9f21e7fb3", + "fingerprint": "dec081a23e6618961bb232cc487273594deafe0bbabd84f73418f3bf18b401b2", "snapshot": { - "packages/hotkeys/tests/sequence-manager.test.ts": "c60d308e49b796ddf0404317b76fe2fa6abcb6a67fd679cbbbb4ae5c75498735" + "packages/hotkeys/tests/sequence-manager.test.ts": "91fa31f933e1ee333cdf36d353e2fb53d38494b48aa3a08a8fb7163990d1fc9b" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/framework/angular/reference/functions/injectHotkey.md": { "fingerprint": "6e39110df15f0273941a7678377e3d2abaf9ccb0cda405a74817b6f70bce98f3", @@ -7196,52 +7186,44 @@ "evidence": ["docs/reference/adapter/functions/withDefaults.md"] }, "source:docs/reference/functions/areHotkeysEqual.md": { - "fingerprint": "1e82fdb64fece7efe28f7994fe9e424bc1d2a1b322e73c82a84125594c9ec7b4", + "fingerprint": "9900d5135178efa87e8eeca8fb5b4790f03907b24ec3d54879bd2fdf0a57cdab", "snapshot": { - "docs/reference/functions/areHotkeysEqual.md": "4e6d5e229efafe4451f630ddc3fbe605af0ead9b9eacdf85a418dada9f444fc4" + "docs/reference/functions/areHotkeysEqual.md": "55835d04f40ba1e97f6d955faee8c2f87b0228d834e1bcad7b54c190c4be490c" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/functions/createHotkeyChordHandler.md": { - "fingerprint": "5bfda57671d37ffd4ed441ac7d3dd0d5a3527fe1c76543d3c22c2365eca25e05", + "fingerprint": "6c8cbc7edc149cfa45981ce042cf0524de497241ca26b93a0d84231249041b43", "snapshot": { - "docs/reference/functions/createHotkeyChordHandler.md": "8c2b9cb90b8b923a1184e9b3cb6fa8d547c221f4edc054269c5ed3f8f4e976a5" + "docs/reference/functions/createHotkeyChordHandler.md": "22abde7b690d6ec8bd894efed99d48fcf9b0c2793df177e595f9e6d9b8323c72" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/functions/createMultiHotkeyChordHandler.md": { - "fingerprint": "57f08aad360b2559eb4895d82e9e01d27def421af492c6ceccdf860508bb12a3", + "fingerprint": "081cca92747866afbd1a1d1d73493a6b1a0100e1f7b2535c5a80da4c7359964a", "snapshot": { - "docs/reference/functions/createMultiHotkeyChordHandler.md": "1f40d896fb9d10318ccf749acedd25af787bfc08dd08eaedd9cb783c022c4370" + "docs/reference/functions/createMultiHotkeyChordHandler.md": "4b22d071f5db70649a4f898d8bd7434d42286b70f41feecd6732f4c766a3c385" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/functions/createSequenceMatcher.md": { - "fingerprint": "95a081713dd214e10daacc7b3fb67abd82ac2a8a60625e7d32a52a93a495b697", + "fingerprint": "0e5973e727a40bf06cfdd5268bd7843f0143279ffa047887cc88e5847ab22c3b", "snapshot": { - "docs/reference/functions/createSequenceMatcher.md": "54a7230f9d454c3bec1c5488563b671f532e1e200bf2ba496dd4c331a6959d3f" + "docs/reference/functions/createSequenceMatcher.md": "b37bb5a42c372b8a955b5c3e99c89e9203e5860e7d4f3faadc77388dae2de116" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/functions/matchesHeldModifiers.md": { "fingerprint": "a70c6c565dd2cff22ec4cf8a99fe3df975e838587412de2f06c02bcf77d2fea9", @@ -7256,28 +7238,24 @@ ] }, "source:docs/reference/functions/matchesKeyboardEvent.md": { - "fingerprint": "ec16081004ba492b948653cea9555ca5e14e8f4c141c275ab01c380b786c7322", + "fingerprint": "bbc8a7c313e995f5f1b9fd949e8dca8b72e0f457efe51d7460825ecdbe7ce8b9", "snapshot": { - "docs/reference/functions/matchesKeyboardEvent.md": "79ae378c248cfefba7d7a69abda19fc494510aee54cc2aa201e41a6f2367bab5" + "docs/reference/functions/matchesKeyboardEvent.md": "c7ad056f133268b60933eb2a37a6a331b6719e9d6fd33ac9ea8722f750e45e6f" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md": { - "fingerprint": "1c65bf9238c21ef44af6ac8cad43be672bdb2387ede4ac99433b3629063ce195", + "fingerprint": "6b6f4c64901e9e0ea8ddf1df7d9a77f0335a3d5f8f8d13223c23ae122597ce71", "snapshot": { - "docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md": "76860c54f0a26e931ed9506c04d041dc247417816c96182439be928b956c6f51" + "docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md": "5e1538436e917f926d90eb34ad714b040ed73b6a5f3baf8bdcda477c4de823ad" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/interfaces/KeyboardEventMatch.md": { "fingerprint": "4a8764a1b65b56b9d147493ec86d100f492b1981ffc21ad7073179cc761fef8e", @@ -7290,28 +7268,24 @@ "evidence": ["docs/reference/interfaces/KeyboardEventMatch.md"] }, "source:docs/reference/type-aliases/MultiHotkeyChordHandler.md": { - "fingerprint": "92024d778d3b4b25e0b022a3c04bfd5c04978dd31b8e88533bbf0e5c43871945", + "fingerprint": "485525a05a62db9ff94e36a93ccbb47628c095bffd396897e0210ff187b0607c", "snapshot": { - "docs/reference/type-aliases/MultiHotkeyChordHandler.md": "ba2e62138c2156c978f9d816f0799090a2fbb3dec6db2119757c8ed40ab42cd0" + "docs/reference/type-aliases/MultiHotkeyChordHandler.md": "ab8a1e0cbee608ee9f90c3b1f1355efb29b6d66596e2a34554ac2c09f19b289f" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md": { - "fingerprint": "5528d4a088f9ae56eb4abff2465a665f97ced1ee98bf7fc1d470edf0ce55fb5d", + "fingerprint": "83c561a9f62c8c6c38ed16e631349a9e9236352bd6cc220c8aa4bc4aaed27d4d", "snapshot": { - "docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md": "6271c4454280260c1d987be0299af41071e344f8fc0d1a150f61db90e92c1311" + "docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md": "ad30530aa74db91b840251c7bf6ebe98109993ffa106f0696463fedead9ec8e8" }, - "head": "1f0a2c627c4a18f005762600966a81e9b8daef3a", - "outcome": "no-change", - "reason": "Refactor to shared types and helpers, generated reference docs, and an example type fix; no guidance changes.", - "evidence": [ - "Behavior and public names are unchanged; reference docs are regenerated by pnpm generate-docs." - ] + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "out-of-scope", + "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "evidence": ["No skill references this file"] }, "source:packages/alpine-hotkeys/src/createHotkeyRecorder.ts": { "fingerprint": "fa4414336c960632c262b4d13e54de02ef630c600024c1c5349285c4baf9546f", @@ -7601,16 +7575,15 @@ ] }, "source:docs/framework/alpine/guides/sequences.md": { - "fingerprint": "c0e9f316a4460604a3c27eaf9d5d6a34d61670e9870808dbcca8e19e1b2a6dfe", + "fingerprint": "5b57ff638e7e513142c3b4510ef53062a515a8e465e3fe7ca5ae42ff57dce227", "snapshot": { - "docs/framework/alpine/guides/sequences.md": "63bdb1e0532dd9f1ac2b85d579b8aba3e137b03c52acda96a798cfe9a1ebef2b" + "docs/framework/alpine/guides/sequences.md": "5d613abb67a3d2724f2139e48060d764228a27748f13f77d51b5796063dbc42b" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/alpine/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/alpine/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/alpine/reference/functions/createHotkeyRecorder.md": { @@ -11818,107 +11791,99 @@ ] }, "source:docs/framework/angular/guides/sequences.md": { - "fingerprint": "8ec0d10824a23dc39eb392daf5019c944edb64419c77f0d8969012d91e36e5c9", + "fingerprint": "db89e250ee5c0eb053a96c088c0e77a793cacb22096d8691562a895192531c2d", "snapshot": { - "docs/framework/angular/guides/sequences.md": "459295dee684dac43f48e9e165fad676f846cd992fc6a29dc971659f4b21d645" + "docs/framework/angular/guides/sequences.md": "52eaae5c6e4c62ee70a656d146eaaf33c16b00f48efdd1da771e963552a21f3a" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/angular/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/angular/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/ember/guides/sequences.md": { - "fingerprint": "5b1a581bb025334bc7e9e3f7b60ddd2c2c580c6e5f816499bf11f46ebdb2aaf0", + "fingerprint": "0145a8ebdc43a0f5e3d8df7bff389797efead4b86a29d9f48e3a1a1f17224692", "snapshot": { - "docs/framework/ember/guides/sequences.md": "85ce542b1b4e0ea17b6f056c356cb5c3c72dc4e6b30f0341a868d1f52cf6ff8e" + "docs/framework/ember/guides/sequences.md": "4427bd3afe797ed9997e63b2e24de7649b2508030843e98fcd1ad71c391ed57b" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/ember/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/ember/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/lit/guides/sequences.md": { - "fingerprint": "1c5ff413c45a95efcfbf362ac9144268e361d250a836f622b87e7cf1ee8b0844", + "fingerprint": "4eb4eab90ad84d416bbf5f424631c309a163389fbb0a658dddd2e7a41ba7167e", "snapshot": { - "docs/framework/lit/guides/sequences.md": "f9f84b21285bf452a1575da853027c150747a3cc494b72ed2c03c2107b7542a3" + "docs/framework/lit/guides/sequences.md": "48fbb717b87194117be47be06cc320faae23d52e69fe41755276796433d74e09" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/lit/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/lit/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/octane/guides/sequences.md": { - "fingerprint": "785d66403f87c2bcb65502ab49ef731cc7ecc6e2f3f97100ab38445710a9961b", + "fingerprint": "65c785f2da697a77551538e0eb21fb56639011c6da63c5d6cb2127ab22417060", "snapshot": { - "docs/framework/octane/guides/sequences.md": "595297b6ecac405ccf5123c1bd296649f703cbf557524c375124726e2e9c93c8" + "docs/framework/octane/guides/sequences.md": "0dafd58975dc5454a3f744606b2330d0109810c7bfa42d9acd93015d8c77e4bb" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/octane/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/octane/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/preact/guides/sequences.md": { - "fingerprint": "dcbc0ebb2c132d533b0ba40b4613002df81b96c2c036949f161c142539aee78f", + "fingerprint": "a399765c3406549cfb6bc1d97f7ed36d45206d593bb5a4119ffd14e4883aafe1", "snapshot": { - "docs/framework/preact/guides/sequences.md": "565be76fe3164322f61fbeffe9e775e0b1c143d82e4dcec3a66f53c82f4fce5e" + "docs/framework/preact/guides/sequences.md": "fb2a8d14e239ac1cedb39b177defb35779120fa345845e15091e871b1d9c67c4" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/preact/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/preact/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/solid/guides/sequences.md": { - "fingerprint": "c98e597e51175c4e5f1dc85de133919bd6647ffab17d1bb27decf7cc74ae3573", + "fingerprint": "f251a9fe0ea429910c5a47d8e5074d18bb45017015759ae57f9af85e8a5e494f", "snapshot": { - "docs/framework/solid/guides/sequences.md": "30891622dc5d7de7dab698bedb34a76538d2afdfa94bad0b2ee160cfb1cc6da1" + "docs/framework/solid/guides/sequences.md": "c6b06fd8bfc54523b4667fbe4d3f4e944e48039c2b840409f51ad15a1f6f3c25" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/solid/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/solid/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/svelte/guides/sequences.md": { - "fingerprint": "f9430e39c108c7f10af7985c41a7d5a212ee69056df82d6ce82509f676acfad1", + "fingerprint": "8857736d0cf5ebd8e5a936730989857130bcfabb1adc4d77ee4ea36186781c2e", "snapshot": { - "docs/framework/svelte/guides/sequences.md": "7e0e0900f06ac08cbf02f3061dcb95d7cf379cf9ca4736c34b5d32036b7c36f0" + "docs/framework/svelte/guides/sequences.md": "9eda0669ce4f39fd08ea052bfaab2ecedd5044d1f0f2f1818ccab319ee9b88c6" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/svelte/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/svelte/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:docs/framework/vue/guides/sequences.md": { - "fingerprint": "4999e267ad75d14e628b861bdc9b71648f2f4b2417d05761e874985d56454a7e", + "fingerprint": "e80e06438e959c21e8048847134f646fd03e66d8a2545d119e1acbbc75482942", "snapshot": { - "docs/framework/vue/guides/sequences.md": "898a3e45c3edf866e1c99afc6bf4954cb49922360638b18434645baae917c554" + "docs/framework/vue/guides/sequences.md": "df43413823ef26b7fd87c593bc0546b5d19db87d393b506d9651913bcc0a234f" }, - "head": "b627bb89ca8120dc83d9664c938ee06117579761", - "outcome": "updated", - "reason": "Guide now teaches the label primitive for every label and calls out that layout labels work only in Chromium browsers. The framework skill says the same.", + "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "outcome": "no-change", + "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", "evidence": [ - "docs/framework/vue/guides/sequences.md", - "git diff 7d9cccc3 -- docs/framework/vue/guides/sequences.md" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" ] }, "source:e2e/browser/chords.spec.ts": { diff --git a/docs/framework/alpine/guides/sequences.md b/docs/framework/alpine/guides/sequences.md index 1ab58c881..79c6100c4 100644 --- a/docs/framework/alpine/guides/sequences.md +++ b/docs/framework/alpine/guides/sequences.md @@ -81,6 +81,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/angular/guides/sequences.md b/docs/framework/angular/guides/sequences.md index 73700c64f..f552dcb44 100644 --- a/docs/framework/angular/guides/sequences.md +++ b/docs/framework/angular/guides/sequences.md @@ -78,6 +78,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/ember/guides/sequences.md b/docs/framework/ember/guides/sequences.md index 967433c9b..18d5214e6 100644 --- a/docs/framework/ember/guides/sequences.md +++ b/docs/framework/ember/guides/sequences.md @@ -96,6 +96,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/lit/guides/sequences.md b/docs/framework/lit/guides/sequences.md index 920aa4a67..78602ada9 100644 --- a/docs/framework/lit/guides/sequences.md +++ b/docs/framework/lit/guides/sequences.md @@ -97,6 +97,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/octane/guides/sequences.md b/docs/framework/octane/guides/sequences.md index 7f3e6ebed..80ecd3765 100644 --- a/docs/framework/octane/guides/sequences.md +++ b/docs/framework/octane/guides/sequences.md @@ -76,6 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/preact/guides/sequences.md b/docs/framework/preact/guides/sequences.md index f3a9c6f3b..91a7d3e29 100644 --- a/docs/framework/preact/guides/sequences.md +++ b/docs/framework/preact/guides/sequences.md @@ -74,6 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/react/guides/sequences.md b/docs/framework/react/guides/sequences.md index f233f5129..5fc12b227 100644 --- a/docs/framework/react/guides/sequences.md +++ b/docs/framework/react/guides/sequences.md @@ -74,6 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/solid/guides/sequences.md b/docs/framework/solid/guides/sequences.md index d529e7da7..a04b88e90 100644 --- a/docs/framework/solid/guides/sequences.md +++ b/docs/framework/solid/guides/sequences.md @@ -76,6 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/svelte/guides/sequences.md b/docs/framework/svelte/guides/sequences.md index 153a247c1..92dfc8673 100644 --- a/docs/framework/svelte/guides/sequences.md +++ b/docs/framework/svelte/guides/sequences.md @@ -74,6 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/vue/guides/sequences.md b/docs/framework/vue/guides/sequences.md index 2b6046a6b..75f24cf1d 100644 --- a/docs/framework/vue/guides/sequences.md +++ b/docs/framework/vue/guides/sequences.md @@ -74,6 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/guides/sensible-defaults.md b/docs/guides/sensible-defaults.md index 8db51d08d..45edfc096 100644 --- a/docs/guides/sensible-defaults.md +++ b/docs/guides/sensible-defaults.md @@ -43,7 +43,7 @@ A logical binding such as `Mod+S` or `?` matches `event.key`, the character the - **Non-Latin layouts.** On a Russian layout, the S position types `ы`. `Mod+S` still matches there, so shortcuts work without switching layouts. - **macOS Option.** Option changes the character, so Option+S types `ß`. `Alt+S` still matches. It follows the letter printed on the key: on a French AZERTY Mac, `Alt+A` fires on the key labeled A, which sits in the US Q position. The matcher reads that letter from `event.keyCode`, and falls back to the key's position when `keyCode` names no letter. Option can also type an ASCII symbol on a letter key, such as `@` for German Option+L, and `Alt+L` still matches. -- **Dead keys and the digit row.** A dead key reports `Dead`, and AZERTY's digit row types `&` and `é` for `1` and `2`. The key's position resolves the shortcut, so `Mod+1` works on AZERTY. +- **Dead keys and the digit row.** A dead key reports `Dead`, and AZERTY's digit row types `&` and `é` for `1` and `2`. The key's position resolves the shortcut, so `Mod+1` works on AZERTY. The exception is `-`, `+`, and `=` typed with Control alone, or Command alone on macOS, because those presses zoom the page. AZERTY types `-` on the 6 key, so Ctrl+- zooms out instead of firing `Mod+6`, and Ctrl+Shift+6 still fires `Mod+6`. - **Symbols typed with Shift.** Shift+1 types `!` on a US layout, and `Shift+1` still matches. Otherwise, the character the key reports wins, wherever the key sits: @@ -447,6 +447,7 @@ A sequence such as `['G', 'G']` completes when each step follows the previous on Sequences are forgiving in a few other ways: - **Pressing a modifier alone does not interrupt a sequence**, so steps can include modifiers: `['Shift+R', 'Shift+T']`. +- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. A dead key types its character together with the next key, so the next key decides whether the sequence goes on. - **Automatic repeats are not steps.** Holding `G` does not complete `['G', 'G']`. - **A wrong key restarts the sequence.** If the wrong key is the sequence's first step, it begins a new attempt, so `G X G G` still completes `['G', 'G']`. - **Progress clears when the timeout passes**, without waiting for another key press, so a UI that shows the pressed steps clears on time. diff --git a/docs/reference/classes/HotkeyManager.md b/docs/reference/classes/HotkeyManager.md index e6241c0e9..c6449651f 100644 --- a/docs/reference/classes/HotkeyManager.md +++ b/docs/reference/classes/HotkeyManager.md @@ -139,7 +139,7 @@ manager.activateScope('dialog', { exclusive: { allow: ['global'] } }) destroy(): void; ``` -Defined in: [hotkey-manager.ts:1809](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1809) +Defined in: [hotkey-manager.ts:1813](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1813) Destroys the manager and removes all listeners. @@ -155,7 +155,7 @@ Destroys the manager and removes all listeners. getRegistrationCount(): number; ``` -Defined in: [hotkey-manager.ts:1741](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1741) +Defined in: [hotkey-manager.ts:1745](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1745) Gets the number of registered hotkeys, chords and sequences. @@ -171,7 +171,7 @@ Gets the number of registered hotkeys, chords and sequences. hasActiveRegistration(hotkey): boolean; ``` -Defined in: [hotkey-manager.ts:1779](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1779) +Defined in: [hotkey-manager.ts:1783](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1783) Checks whether a hotkey can fire now: at least one registration is enabled, in an active scope, and listening where key presses go. A @@ -205,7 +205,7 @@ True if a registration that can fire exists isRegistered(hotkey, target?): boolean; ``` -Defined in: [hotkey-manager.ts:1752](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1752) +Defined in: [hotkey-manager.ts:1756](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1756) Checks if a specific hotkey is registered. @@ -331,7 +331,7 @@ handle.unregister() resetSequenceProgress(): void; ``` -Defined in: [hotkey-manager.ts:1726](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1726) +Defined in: [hotkey-manager.ts:1730](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1730) Resets the progress of every in-progress sequence. diff --git a/docs/reference/functions/areHotkeysEqual.md b/docs/reference/functions/areHotkeysEqual.md index cb148e63e..9f4b1fcf4 100644 --- a/docs/reference/functions/areHotkeysEqual.md +++ b/docs/reference/functions/areHotkeysEqual.md @@ -13,7 +13,7 @@ function areHotkeysEqual( ): boolean; ``` -Defined in: [match.ts:195](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L195) +Defined in: [match.ts:199](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L199) Compares normalized hotkey identity, including all four modifiers. Sequences are equal when every step is equal; a one-step sequence equals its chord. diff --git a/docs/reference/functions/createHotkeyChordHandler.md b/docs/reference/functions/createHotkeyChordHandler.md index bcbe53aae..c72bc8252 100644 --- a/docs/reference/functions/createHotkeyChordHandler.md +++ b/docs/reference/functions/createHotkeyChordHandler.md @@ -13,7 +13,7 @@ function createHotkeyChordHandler( ): (event) => void; ``` -Defined in: [match.ts:96](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L96) +Defined in: [match.ts:100](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L100) Creates a keyboard event handler that calls the callback when the chord matches. For sequences, use `createSequenceMatcher`. diff --git a/docs/reference/functions/createMultiHotkeyChordHandler.md b/docs/reference/functions/createMultiHotkeyChordHandler.md index e6b0c1c93..913e8438e 100644 --- a/docs/reference/functions/createMultiHotkeyChordHandler.md +++ b/docs/reference/functions/createMultiHotkeyChordHandler.md @@ -9,7 +9,7 @@ title: createMultiHotkeyChordHandler function createMultiHotkeyChordHandler(handlers, options?): (event) => void; ``` -Defined in: [match.ts:150](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L150) +Defined in: [match.ts:154](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L154) Creates a handler that matches several chords. diff --git a/docs/reference/functions/createSequenceMatcher.md b/docs/reference/functions/createSequenceMatcher.md index fcc6650b9..c4d723e0d 100644 --- a/docs/reference/functions/createSequenceMatcher.md +++ b/docs/reference/functions/createSequenceMatcher.md @@ -9,7 +9,7 @@ title: createSequenceMatcher function createSequenceMatcher(sequence, options?): object; ``` -Defined in: [match.ts:240](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L240) +Defined in: [match.ts:248](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L248) Creates a simple sequence matcher for one-off use. @@ -17,6 +17,10 @@ This is a low-level helper that does not support ignoreInputs, target, or other HotkeyOptions. Callers must handle input filtering themselves if attaching to document. +Modifier presses, auto-repeats, and keys an input method editor reads are +not steps. Lock keys such as CapsLock and NumLock, Fn, and dead keys advance +the sequence when they match the next step and otherwise keep its progress. + ## Parameters ### sequence diff --git a/docs/reference/functions/getHotkeyManager.md b/docs/reference/functions/getHotkeyManager.md index fa9b87e2e..9017895ce 100644 --- a/docs/reference/functions/getHotkeyManager.md +++ b/docs/reference/functions/getHotkeyManager.md @@ -9,7 +9,7 @@ title: getHotkeyManager function getHotkeyManager(): HotkeyManager; ``` -Defined in: [hotkey-manager.ts:1823](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1823) +Defined in: [hotkey-manager.ts:1827](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1827) Gets the singleton HotkeyManager instance. Convenience function for accessing the manager. diff --git a/docs/reference/functions/matchesKeyboardEvent.md b/docs/reference/functions/matchesKeyboardEvent.md index 6ff10667d..fe3fabf5f 100644 --- a/docs/reference/functions/matchesKeyboardEvent.md +++ b/docs/reference/functions/matchesKeyboardEvent.md @@ -13,7 +13,7 @@ function matchesKeyboardEvent( ): boolean; ``` -Defined in: [match.ts:53](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L53) +Defined in: [match.ts:57](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L57) Checks if a KeyboardEvent matches a hotkey. @@ -24,7 +24,11 @@ that typed a symbol, such as `?`, does not need to be written. When `event.key` cannot name the shortcut, the key's conventional position (`event.code`) stands in. That covers non-Latin letters, dead keys, the -digit row, symbols typed with Shift, and what macOS Option types. With +digit row, symbols typed with Shift, and what macOS Option types. On the +digit row, `-`, `+`, and `=` typed with Control alone, or Command alone on +macOS, don't stand in, because those presses zoom the page: AZERTY Ctrl+- +doesn't fire `Mod+6`. +With Option held on macOS, the letter comes from the keycap (`event.keyCode`) when the browser reports one. A named key such as `End` and a character typed with AltGr match only as themselves, and so does an ASCII letter diff --git a/docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md b/docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md index 8c1e0fb46..e695638c2 100644 --- a/docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md +++ b/docs/reference/interfaces/CreateHotkeyChordHandlerOptions.md @@ -5,7 +5,7 @@ title: CreateHotkeyChordHandlerOptions -Defined in: [match.ts:68](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L68) +Defined in: [match.ts:72](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L72) Options for creating a chord handler. @@ -17,7 +17,7 @@ Options for creating a chord handler. optional platform?: HotkeyPlatform; ``` -Defined in: [match.ts:74](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L74) +Defined in: [match.ts:78](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L78) The target platform for resolving 'Mod' @@ -29,7 +29,7 @@ The target platform for resolving 'Mod' optional preventDefault?: boolean; ``` -Defined in: [match.ts:70](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L70) +Defined in: [match.ts:74](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L74) Prevent the default browser action when the chord matches. Defaults to true @@ -41,6 +41,6 @@ Prevent the default browser action when the chord matches. Defaults to true optional stopPropagation?: boolean; ``` -Defined in: [match.ts:72](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L72) +Defined in: [match.ts:76](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L76) Stop event propagation when the chord matches. Defaults to true diff --git a/docs/reference/type-aliases/MultiHotkeyChordHandler.md b/docs/reference/type-aliases/MultiHotkeyChordHandler.md index 85680c158..5589a50c8 100644 --- a/docs/reference/type-aliases/MultiHotkeyChordHandler.md +++ b/docs/reference/type-aliases/MultiHotkeyChordHandler.md @@ -9,4 +9,4 @@ title: MultiHotkeyChordHandler type MultiHotkeyChordHandler = { [K in HotkeyChord]?: HotkeyCallback }; ``` -Defined in: [match.ts:128](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L128) +Defined in: [match.ts:132](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L132) diff --git a/docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md b/docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md index d180f63fc..9813df606 100644 --- a/docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md +++ b/docs/reference/variables/DEFAULT_SEQUENCE_TIMEOUT.md @@ -9,6 +9,6 @@ title: DEFAULT_SEQUENCE_TIMEOUT const DEFAULT_SEQUENCE_TIMEOUT: 1000 = 1000; ``` -Defined in: [match.ts:216](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L216) +Defined in: [match.ts:220](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/match.ts#L220) Default timeout between sequence steps (in milliseconds). diff --git a/e2e/layouts/layouts.spec.ts b/e2e/layouts/layouts.spec.ts index d12d996e8..142e560ed 100644 --- a/e2e/layouts/layouts.spec.ts +++ b/e2e/layouts/layouts.spec.ts @@ -33,6 +33,8 @@ describeLayouts('Layout', { '&', 'Shift+1', 'Mod+1', + 'Mod+6', + 'Mod+Shift+0', '/', 'Mod+/', 'Shift+7', @@ -40,7 +42,7 @@ describeLayouts('Layout', { '^', '[Backquote]', ], - registered: ['A', 'Q', 'Mod+S', 'Mod+O', 'Mod+Z', '1', '/'], + registered: ['A', 'Q', 'Mod+S', 'Mod+O', 'Mod+Z', '1', 'Mod+6', '/'], layouts: { // French AZERTY: A and Q swap, digits need Shift. fr: [ @@ -84,6 +86,13 @@ describeLayouts('Layout', { parsed: 'Mod+&', recorded: 'Mod+&', }, + // The 6 key types "-", so Control+- zooms out instead of firing Mod+6 + { keys: 'Control+Digit6', matches: [], parsed: 'Mod+-' }, + { + keys: 'Control+Shift+Digit6', + matches: ['Mod+6'], + parsed: 'Mod+Shift+6', + }, ], // German QWERTZ: Y and Z swap, / is Shift+7, ^ is a dead key. de: [ @@ -115,6 +124,12 @@ describeLayouts('Layout', { parsed: 'Mod+-', recorded: 'Mod+-', }, + // Shift+0 types "=", which isn't zoom, so the 0 position still fires + { + keys: 'Control+Shift+Digit0', + matches: ['Mod+Shift+0'], + parsed: 'Mod+Shift+=', + }, // NumLock off: the numpad 1 key is End { keys: 'Numpad1', matches: [], parsed: 'End', recorded: '[Numpad1]' }, { diff --git a/e2e/support/x11.ts b/e2e/support/x11.ts index d1da3ac2c..397ede42e 100644 --- a/e2e/support/x11.ts +++ b/e2e/support/x11.ts @@ -53,6 +53,8 @@ export const KEYCODES = { NumLock: 77, Digit3: 12, Digit4: 13, + Digit6: 15, + Digit0: 19, KeyC: 54, Quote: 48, Semicolon: 47, diff --git a/packages/hotkeys/src/_keyboard-event.ts b/packages/hotkeys/src/_keyboard-event.ts index 9bbfdfbea..b2d2b504b 100644 --- a/packages/hotkeys/src/_keyboard-event.ts +++ b/packages/hotkeys/src/_keyboard-event.ts @@ -100,6 +100,14 @@ export function isSequenceStep(event: KeyboardEvent): boolean { ) } +/** + * Whether a key event that matches no step leaves a sequence's progress alone: + * a lock key, Fn, or a dead key, whose character comes with the next key. + */ +export function keepsSequenceProgress(event: KeyboardEvent): boolean { + return /^(CapsLock|NumLock|ScrollLock|Fn|FnLock|Dead)$/.test(event.key) +} + /** * Maps familiar positions to compatibility fallback keys for the logical matcher. * This assumes conventional positions, not the active layout; never use it to diff --git a/packages/hotkeys/src/_match.ts b/packages/hotkeys/src/_match.ts index ac949a932..0d36f026f 100644 --- a/packages/hotkeys/src/_match.ts +++ b/packages/hotkeys/src/_match.ts @@ -151,7 +151,9 @@ export function matchKeyboardEvent( * AZERTY rearrange, and numpad positions, whose output depends on NumLock. * Chrome on Linux Wayland reports Ctrl+` this way, and Firefox reports * numpad 5 with NumLock off this way. - * - anything on the digit row, where AZERTY types `&` and `é` for 1 and 2 + * - anything on the digit row, where AZERTY types `&` and `é` for 1 and 2, + * except `-`, `+` or `=` typed with only the platform's zoom modifier, + * Control or macOS Command: AZERTY Ctrl+- on the 6 key is zoom out * - ASCII symbols typed with Shift, such as `!` for Shift+1 * - ASCII symbols typed with macOS Option on a letter position, such as `~` * for US Cmd+Option+N, where Command cancels the dead key @@ -171,7 +173,12 @@ function positionStandsIn( ): boolean { if (key === 'Unidentified') return !/^(Key|Numpad)/.test(code) if (key !== 'Dead' && !isPrintableKey(key)) return false - if (code.startsWith('Digit')) return true + if (code.startsWith('Digit')) { + // AZERTY types `-` on the 6 key, so Ctrl+- is zoom out, not Ctrl+6 + const zoom = + !shift && !alt && (platform === 'mac' ? meta && !ctrl : ctrl && !meta) + return !zoom || !/^[-+=]$/.test(key) + } if (isAsciiLetter(key)) return false const letterKey = code.startsWith('Key') if (/^[!-~]$/.test(key)) { diff --git a/packages/hotkeys/src/hotkey-manager.ts b/packages/hotkeys/src/hotkey-manager.ts index 6d42988ae..6baa036fe 100644 --- a/packages/hotkeys/src/hotkey-manager.ts +++ b/packages/hotkeys/src/hotkey-manager.ts @@ -7,7 +7,7 @@ import { targetHasFocus, yieldsEscape, } from './_event-target' -import { isSequenceStep } from './_keyboard-event' +import { isSequenceStep, keepsSequenceProgress } from './_keyboard-event' import { keysEqual } from './_keys' import { managerRef } from './_manager-ref' import { matchKeyboardEvent } from './_match' @@ -1577,8 +1577,12 @@ export class HotkeyManager { // Ctrl+K then Ctrl+C. Propagation stops only on the last step. this.#prevent(event) } - } else if (registration.currentIndex > 0) { - // A mismatched or weaker candidate cannot carry stale progress forward. + } else if ( + registration.currentIndex > 0 && + !(bestScore === 0 && keepsSequenceProgress(event)) + ) { + // A mismatched or weaker candidate cannot carry stale progress + // forward. CapsLock or a dead key that matches no step leaves it alone. registration.currentIndex = 0 changed = true } @@ -1589,7 +1593,7 @@ export class HotkeyManager { if (registration.currentIndex > 0) { this.#scheduleSequenceReset( registration.id, - sequenceTimeout(registration) + 1, + registration.lastKeyTime + sequenceTimeout(registration) + 1 - now, ) } else { this.#clearSequenceReset(registration.id) diff --git a/packages/hotkeys/src/match.ts b/packages/hotkeys/src/match.ts index 5c13261c0..ffe670d7a 100644 --- a/packages/hotkeys/src/match.ts +++ b/packages/hotkeys/src/match.ts @@ -1,5 +1,5 @@ import { chordHasKey, hotkeySteps, parsedChordsEqual } from './_chord' -import { isSequenceStep } from './_keyboard-event' +import { isSequenceStep, keepsSequenceProgress } from './_keyboard-event' import { matchKeyboardEvent } from './_match' import { formatHotkey } from './format' import { parseHotkey } from './parse' @@ -24,7 +24,11 @@ import type { HotkeyPlatform } from './platform' * * When `event.key` cannot name the shortcut, the key's conventional position * (`event.code`) stands in. That covers non-Latin letters, dead keys, the - * digit row, symbols typed with Shift, and what macOS Option types. With + * digit row, symbols typed with Shift, and what macOS Option types. On the + * digit row, `-`, `+`, and `=` typed with Control alone, or Command alone on + * macOS, don't stand in, because those presses zoom the page: AZERTY Ctrl+- + * doesn't fire `Mod+6`. + * With * Option held on macOS, the letter comes from the keycap (`event.keyCode`) * when the browser reports one. A named key such as `End` and a character * typed with AltGr match only as themselves, and so does an ASCII letter @@ -222,6 +226,10 @@ export const DEFAULT_SEQUENCE_TIMEOUT = 1000 * or other HotkeyOptions. Callers must handle input filtering themselves * if attaching to document. * + * Modifier presses, auto-repeats, and keys an input method editor reads are + * not steps. Lock keys such as CapsLock and NumLock, Fn, and dead keys advance + * the sequence when they match the next step and otherwise keep its progress. + * * @param sequence - The sequence of hotkeys to match * @param options - Options including timeout * @returns An object with match() and reset() methods @@ -279,7 +287,7 @@ export function createSequenceMatcher( if (matchesKeyboardEvent(event, parsedSequence[0]!, platform)) { currentIndex = 1 lastKeyTime = now - } else { + } else if (!keepsSequenceProgress(event)) { currentIndex = 0 } } diff --git a/packages/hotkeys/tests/hotkey-manager.test.ts b/packages/hotkeys/tests/hotkey-manager.test.ts index 71e932fbf..1c7d85413 100644 --- a/packages/hotkeys/tests/hotkey-manager.test.ts +++ b/packages/hotkeys/tests/hotkey-manager.test.ts @@ -604,6 +604,21 @@ describe('HotkeyManager', () => { expect(physical).toHaveBeenCalledOnce() }) + it('leaves AZERTY Control+- (zoom out) to the browser with Mod+6 registered', () => { + const manager = HotkeyManager.getInstance() + const callback = vi.fn() + manager.register('Mod+6', callback, { platform: 'linux' }) + + const event = keydown({ + key: '-', + ctrlKey: true, + code: 'Digit6', + target: document, + }) + expect(callback).not.toHaveBeenCalled() + expect(event.defaultPrevented).toBe(false) + }) + it('prefers a physical binding over the fallback for an Unidentified key', () => { const manager = HotkeyManager.getInstance() const logical = vi.fn() diff --git a/packages/hotkeys/tests/match.test.ts b/packages/hotkeys/tests/match.test.ts index f8f5735f8..69557a8cd 100644 --- a/packages/hotkeys/tests/match.test.ts +++ b/packages/hotkeys/tests/match.test.ts @@ -933,6 +933,128 @@ describe('matchesKeyboardEvent', () => { const event = createKeyboardEvent('4', { code: 'Digit4' }) expect(matchesKeyboardEvent(event, '4')).toBe(true) }) + + describe('zoom keys with Control or Command', () => { + const platforms = ['linux', 'windows', 'mac'] as const + const mod = (platform: HotkeyPlatform) => + platform === 'mac' ? { metaKey: true } : { ctrlKey: true } + + it.each(platforms)( + 'AZERTY Mod+- (zoom out) does not fire Mod+6 on %s', + (platform) => { + const event = createKeyboardEvent('-', { + ...mod(platform), + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, 'Mod+6', platform)).toBe(false) + }, + ) + + it.each(platforms)( + 'Czech Mod++ (zoom in) does not fire Mod+1 on %s', + (platform) => { + const event = createKeyboardEvent('+', { + ...mod(platform), + code: 'Digit1', + }) + expect(matchesKeyboardEvent(event, 'Mod+1', platform)).toBe(false) + }, + ) + + it('Programmer Dvorak Control+= does not fire Control+6', () => { + const event = createKeyboardEvent('=', { + ctrlKey: true, + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, 'Control+6', 'linux')).toBe(false) + }) + + it('still matches the zoom key by its character', () => { + const event = createKeyboardEvent('-', { + ctrlKey: true, + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, 'Control+-', 'linux')).toBe(true) + expect(matchesKeyboardEvent(event, 'Control+[Digit6]', 'linux')).toBe( + true, + ) + }) + + it('keeps the fallback without Control or Command', () => { + const event = createKeyboardEvent('-', { code: 'Digit6' }) + expect(matchesKeyboardEvent(event, '6', 'linux')).toBe(true) + }) + + it.each(platforms)( + 'AZERTY Mod+Shift+6 still fires Mod+6 on %s', + (platform) => { + const event = createKeyboardEvent('6', { + ...mod(platform), + shiftKey: true, + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, 'Mod+6', platform)).toBe(true) + }, + ) + + // German, Nordic, Spanish, and Italian layouts type = with Shift+0, and + // Swiss German types + with Shift+1. Those presses aren't zoom. + it.each(platforms)( + 'German Mod+Shift+0 (=) still fires Mod+Shift+0 on %s', + (platform) => { + const event = createKeyboardEvent('=', { + ...mod(platform), + shiftKey: true, + code: 'Digit0', + }) + expect(matchesKeyboardEvent(event, 'Mod+Shift+0', platform)).toBe( + true, + ) + }, + ) + + it('Swiss German Control+Shift+1 (+) still fires Control+Shift+1', () => { + const event = createKeyboardEvent('+', { + ctrlKey: true, + shiftKey: true, + code: 'Digit1', + }) + expect(matchesKeyboardEvent(event, 'Control+Shift+1', 'windows')).toBe( + true, + ) + }) + + it.each([ + ['Meta on Linux', 'linux', { metaKey: true }, 'Meta+6'], + ['Control on macOS', 'mac', { ctrlKey: true }, 'Control+6'], + [ + 'Control and Meta', + 'linux', + { ctrlKey: true, metaKey: true }, + 'Control+Meta+6', + ], + ] as const)( + 'keeps the fallback for %s, which is not zoom', + (_, platform, modifiers, hotkey) => { + const event = createKeyboardEvent('-', { + ...modifiers, + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, hotkey, platform)).toBe(true) + }, + ) + + it('keeps Control+Alt (AltGr on Windows) on the digit row', () => { + const event = createKeyboardEvent('-', { + ctrlKey: true, + altKey: true, + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, 'Control+Alt+6', 'windows')).toBe( + true, + ) + }) + }) }) describe('Unicode normalization edge cases', () => { diff --git a/packages/hotkeys/tests/sequence-manager.test.ts b/packages/hotkeys/tests/sequence-manager.test.ts index 423662b84..d4b81f4f7 100644 --- a/packages/hotkeys/tests/sequence-manager.test.ts +++ b/packages/hotkeys/tests/sequence-manager.test.ts @@ -737,6 +737,97 @@ describe('HotkeyManager', () => { expect(callback).not.toHaveBeenCalled() }) + describe.each([ + ['CapsLock', 'CapsLock'], + ['NumLock', 'NumLock'], + ['ScrollLock', 'ScrollLock'], + ['Fn', 'Fn'], + ['FnLock', 'FnLock'], + ['Dead', 'Quote'], + ])('a %s keydown between steps', (key, code) => { + it('keeps the sequence going', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register(['G', 'T'], callback) + + keydown({ key: 'g', code: 'KeyG', target: document }) + keydown({ key, code, target: document }) + keydown({ key: 't', code: 'KeyT', target: document }) + + expect(callback).toHaveBeenCalledTimes(1) + }) + + it('keeps a standalone sequence matcher going', () => { + const matcher = createSequenceMatcher(['G', 'T']) + + matcher.match(keydown({ key: 'g', code: 'KeyG' })) + expect(matcher.match(keydown({ key, code }))).toBe(false) + expect(matcher.getProgress()).toBe(1) + expect(matcher.match(keydown({ key: 't', code: 'KeyT' }))).toBe(true) + }) + }) + + it('resets other sequences when a lock key completes one', () => { + const lock = vi.fn() + const letters = vi.fn() + const manager = HotkeyManager.getInstance() + manager.register(['G', 'CapsLock'], lock) + manager.register(['G', 'T'], letters) + + keydown({ key: 'g', code: 'KeyG', target: document }) + keydown({ key: 'CapsLock', code: 'CapsLock', target: document }) + keydown({ key: 't', code: 'KeyT', target: document }) + + expect(lock).toHaveBeenCalledTimes(1) + expect(letters).not.toHaveBeenCalled() + }) + + it('keeps a keyup sequence going across a CapsLock keyup', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register(['G', 'T'], callback, { + eventType: 'keyup', + }) + + keyup({ key: 'g', code: 'KeyG', target: document }) + keyup({ key: 'CapsLock', code: 'CapsLock', target: document }) + keyup({ key: 't', code: 'KeyT', target: document }) + + expect(callback).toHaveBeenCalledTimes(1) + }) + + it('still advances on a lock key that is the next step', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register(['G', 'CapsLock'], callback) + + keydown({ key: 'g', code: 'KeyG', target: document }) + keydown({ key: 'CapsLock', code: 'CapsLock', target: document }) + + expect(callback).toHaveBeenCalledTimes(1) + }) + + // US International types é with a dead ' and then E + it('completes a step typed through a dead key', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register(['G', 'é'] as never, callback) + + keydown({ key: 'g', code: 'KeyG', target: document }) + keydown({ key: 'Dead', code: 'Quote', target: document }) + keydown({ key: 'é', code: 'KeyE', target: document }) + + expect(callback).toHaveBeenCalledTimes(1) + }) + + it('resets when the key after a dead key does not continue the sequence', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register(['G', 'E'], callback) + + keydown({ key: 'g', code: 'KeyG', target: document }) + keydown({ key: 'Dead', code: 'Quote', target: document }) + keydown({ key: 'é', code: 'KeyE', target: document }) + keydown({ key: 'e', code: 'KeyE', target: document }) + + expect(callback).not.toHaveBeenCalled() + }) + // German AltGr+Q types `@`. Windows sends a Control keydown before the // AltGraph keydown, and reports Control+Alt on the character. describe.each([ @@ -1340,6 +1431,24 @@ describe('sequence matching regressions', () => { expect(vi.getTimerCount()).toBe(0) subscription.unsubscribe() }) + + it('does not extend the timeout for a CapsLock keydown between steps', () => { + vi.useFakeTimers() + const manager = HotkeyManager.getInstance() + const handle = manager.register(['G', 'H'], () => {}, { timeout: 500 }) + const progress = () => { + const registration = manager.registrations.state.get(handle.id)! + return registration.kind === 'sequence' ? registration.currentIndex : -1 + } + + keydown({ key: 'g', target: document }) + vi.advanceTimersByTime(400) + keydown({ key: 'CapsLock', code: 'CapsLock', target: document }) + expect(progress()).toBe(1) + vi.advanceTimersByTime(101) + expect(progress()).toBe(0) + handle.unregister() + }) }) describe('a sequence that starts a longer one', () => { From 9037f6ef21aa3659b534474b93c24eb24ff5e9f0 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 21 Nov 2026 00:03:06 -0600 Subject: [PATCH 2/6] ci: Pin TanStack/config to its current main commit TanStack/config main moved to 88949c60 (a README-only change), so the `# main` comments no longer matched the a041f4ee pins and zizmor failed. --- .github/workflows/autofix.yml | 2 +- .github/workflows/e2e-flaky.yml | 4 +- .github/workflows/e2e-platforms.yml | 4 +- .github/workflows/e2e.yml | 8 ++-- .github/workflows/nightly.yml | 6 +-- .github/workflows/pr.yml | 8 ++-- .github/workflows/release.yml | 4 +- .intent/review-state.json | 70 ++++++++++++++--------------- 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 473ef11ca..b401dc9d2 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -20,7 +20,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Fix formatting run: pnpm run format - name: Regenerate docs diff --git a/.github/workflows/e2e-flaky.yml b/.github/workflows/e2e-flaky.yml index 11c0e3f50..7e1af2160 100644 --- a/.github/workflows/e2e-flaky.yml +++ b/.github/workflows/e2e-flaky.yml @@ -25,7 +25,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install --with-deps chromium firefox webkit - name: Run Browser Tests @@ -40,7 +40,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install X11 Tools run: | sudo apt-get update diff --git a/.github/workflows/e2e-platforms.yml b/.github/workflows/e2e-platforms.yml index b1d0e15dd..293849326 100644 --- a/.github/workflows/e2e-platforms.yml +++ b/.github/workflows/e2e-platforms.yml @@ -24,7 +24,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install chromium firefox webkit # WebKit on macOS is much closer to Safari than WebKit on Linux. @@ -40,7 +40,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main # Edge comes with the runner image. - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install chromium firefox diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 60889084a..31337931b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,7 +22,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install --with-deps chromium firefox webkit - name: Run Browser Tests @@ -37,7 +37,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install --with-deps chromium firefox webkit - name: Run Adapter Tests @@ -52,7 +52,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install X11 Tools run: | sudo apt-get update @@ -72,7 +72,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install --with-deps chromium - name: Run Server Rendering Tests diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 83751f3d2..400bbf16d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,7 +26,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Browsers run: pnpm --filter @tanstack/hotkeys-e2e exec playwright install chromium firefox - name: Add Keyboard Layouts @@ -63,7 +63,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install Wayland Tools run: | sudo apt-get update @@ -95,7 +95,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Install X11 and ibus run: | sudo apt-get update diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3569f6984..1a00820a0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Get base and head commits for `nx affected` uses: nrwl/nx-set-shas@e602fada7ad5987b0f7b1905e7a99ea1c661514c # v5.1.0 with: @@ -40,7 +40,7 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Build Packages run: pnpm run build:all - name: Publish Previews @@ -57,6 +57,6 @@ jobs: with: persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Changeset Preview - uses: TanStack/config/.github/changeset-preview@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/changeset-preview@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30fa3f89d..bb0d510df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Setup Tools - uses: TanStack/config/.github/setup@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/setup@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main - name: Run Tests run: pnpm run test:ci - name: Run Changesets (version or publish) @@ -42,6 +42,6 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Comment on PRs about release if: steps.changesets.outputs.published == 'true' - uses: TanStack/config/.github/comment-on-release@a041f4eeb8e4d595aee89f8992b20c669288a741 # main + uses: TanStack/config/.github/comment-on-release@88949c60ce4973c0aea4395a6bafb37cd7390e3b # main with: published-packages: ${{ steps.changesets.outputs.published-packages }} diff --git a/.intent/review-state.json b/.intent/review-state.json index e11e8438f..0f63066dd 100644 --- a/.intent/review-state.json +++ b/.intent/review-state.json @@ -8672,14 +8672,14 @@ ] }, "source:.github/workflows/e2e.yml": { - "fingerprint": "ad41efe7b9637b87ccd967d47136b17f6030d593de1cd6a6fa99d67742c75fc8", + "fingerprint": "47a3a5cdabfd00a2c8ce0bee8a91530b93aff90b62ee3d66a92af1ba379f8626", "snapshot": { - ".github/workflows/e2e.yml": "ee1f7c14369363539bbfc207680cb7e7e2fe667e18d6b0e176272151c87171ca" + ".github/workflows/e2e.yml": "6d887cca3ca7ce1f0ee0b39167253bd26f7561f35996486f1084d6dcfe79ff28" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/e2e.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:.prettierignore": { "fingerprint": "6b9e10e4e967f462a752ee95fd3fcb4967db2763e3e9228683444db552a4ca05", @@ -18475,24 +18475,24 @@ ] }, "source:.github/workflows/e2e-flaky.yml": { - "fingerprint": "c8e0a2cb24bad36161763c3a29eed4f7e74bf2e0988714e459bc606f9697f978", + "fingerprint": "880cdfd2aecd78a81486333b8dd253c6809f11d58939b747ac2f180b88e47212", "snapshot": { - ".github/workflows/e2e-flaky.yml": "adb3a987d4ec71d4bdee29fa3a9aab2ff78993bc6607ee3bd6bda72f4d24d1a3" + ".github/workflows/e2e-flaky.yml": "d2cae18d3f2b43020d0fca89d9dd4ee9758f2c6615397548fb86ac8999bcfab1" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/e2e-flaky.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:.github/workflows/e2e-platforms.yml": { - "fingerprint": "407b246f55fdebe1083ee4fbb01e9a6f6f84949b1bab9f0e84625c954a899bb9", + "fingerprint": "c43cdef7e0aa4cf8fb88098a60901574b968c9368b37eda5382f0801d31402e9", "snapshot": { - ".github/workflows/e2e-platforms.yml": "012aa1894bf9568b0397ccac123b22eebbc15ff8e0ec7ac0e47a6c9c21d09b0f" + ".github/workflows/e2e-platforms.yml": "9ed96de10c113972d7cc383f68b19a4bafdd0cf9bcec3280090b68f4f564c29e" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/e2e-platforms.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:e2e/adapters/adapters.spec.ts": { "fingerprint": "ff474bd1f24df0e3c14f27176cd19b1c9c9c4f97fa2e6e010ff656a22e8a946e", @@ -19415,14 +19415,14 @@ ] }, "source:.github/workflows/nightly.yml": { - "fingerprint": "bf3e5242cdbb695cbd3c066f29770e6758cbbc7f6930baed766c9c31053004ef", + "fingerprint": "f591bfde7a79d514088bd947ac524d17dd5011f04e6cd9a76523ae6da80d997e", "snapshot": { - ".github/workflows/nightly.yml": "3b58c68cdc81080f484604abc71de7cedb95c4639495c881db9269e6b0732a35" + ".github/workflows/nightly.yml": "7ca3bf15e8cff7b23b0721e90e6cdd851ea5702ee2669dfe7b7c0688262fb49d" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/nightly.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:e2e/native/ibus.spec.ts": { "fingerprint": "b478d441328a1b043ab0dddd5acd91f11cac4e061a44d786f02e64b037a2c365", @@ -20060,34 +20060,34 @@ "evidence": [".github/renovate.json"] }, "source:.github/workflows/autofix.yml": { - "fingerprint": "440647d00462b905e501f540647e34b943f42f180faaa465d50b767add2efd51", + "fingerprint": "a4650fbdfe0e2d4d0e383ef0d84f04126cdcebdf8f3b7b0ac89560feaf6df046", "snapshot": { - ".github/workflows/autofix.yml": "c9a04a21bcdaf4a2c5906e05be629aae41dccf2fa1d76f81676a00fbd6bcd3bc" + ".github/workflows/autofix.yml": "7d4cae99bcc92aabccf679d0cb363654b5f6e28fc3deaf504b8f5520280ec6c4" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/autofix.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:.github/workflows/pr.yml": { - "fingerprint": "5c94176e7de3e9b5408882833103b14ca9762a35bb90ad0c85d334fefb084662", + "fingerprint": "ff12dc3692e045e9c7b6c46545bf31323d9e3937a86cc0efc714bd0b98f1660f", "snapshot": { - ".github/workflows/pr.yml": "fabf643836d9243b5dd7ad445ba0025c3b7fcaf1d5e737fa7bb4e069a96ea93e" + ".github/workflows/pr.yml": "721bed692dfb3ecaa68d1490bcfec095e6a3ba80f12d7c67bb5d4fe94587cc54" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/pr.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:.github/workflows/release.yml": { - "fingerprint": "86cb3a337d16c7d01cdb7511f2dd3a2aa7074f689897dd4e42f251411560e31a", + "fingerprint": "fbb39ec8c5ecafa223d42785517f803de26c234ed8cb163155e2398cc69dac4a", "snapshot": { - ".github/workflows/release.yml": "c04379bbf3a9eb156c2190b385918d4a92cd89a33b927a12d30ec3e12e993b11" + ".github/workflows/release.yml": "10263cbaf209ae47260c9901d2770cfe432cc11076c673f240f1b06b7d252432" }, - "head": "b0efa6a0b8505e8bc98092ec9da06557ef49b0a4", + "head": "71c368fcfd0162d87ae0003073b25de58a42b419", "outcome": "out-of-scope", - "reason": "Dependency and CI tooling update (action pins, Renovate config removal, release-age exceptions); does not affect library behavior or skill guidance.", - "evidence": [".github/workflows/release.yml"] + "reason": "CI workflow pin of TanStack/config moved to its current main commit; no skill guidance depends on CI workflows.", + "evidence": ["No skill references this file"] }, "source:.github/workflows/zizmor.yml": { "fingerprint": "57b02f51f1dc89b02cf3f33acff8e5f3c5391bb97b8da216eee0cc8c3df2231d", From 8defa512828757067b9d6116441f2d71110f0a3d Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 21 Nov 2026 00:15:46 -0600 Subject: [PATCH 3/6] fix(hotkeys): Fire a keyup hotkey on its key's release after the character changes With Mod+6 as a keyup hotkey on AZERTY, Ctrl+Shift+6 with Shift released first sends the 6 key's keyup as Control+-, which the zoom guard rejects. The release of the pressed key now ends the press by its code. Also note in the sequence guides and changeset that a lock or dead key that starts or completes another sequence still resets the others. --- .changeset/digit-row-zoom-keys.md | 2 +- .changeset/sequence-lock-and-dead-keys.md | 2 +- .intent/review-state.json | 142 +++++++++--------- docs/framework/alpine/guides/sequences.md | 2 +- docs/framework/angular/guides/sequences.md | 2 +- docs/framework/ember/guides/sequences.md | 2 +- docs/framework/lit/guides/sequences.md | 2 +- docs/framework/octane/guides/sequences.md | 2 +- docs/framework/preact/guides/sequences.md | 2 +- docs/framework/react/guides/sequences.md | 2 +- docs/framework/solid/guides/sequences.md | 2 +- docs/framework/svelte/guides/sequences.md | 2 +- docs/framework/vue/guides/sequences.md | 2 +- docs/guides/sensible-defaults.md | 2 +- docs/reference/classes/HotkeyManager.md | 10 +- docs/reference/functions/getHotkeyManager.md | 2 +- packages/hotkeys/src/hotkey-manager.ts | 4 + packages/hotkeys/tests/hotkey-manager.test.ts | 21 +++ 18 files changed, 115 insertions(+), 90 deletions(-) diff --git a/.changeset/digit-row-zoom-keys.md b/.changeset/digit-row-zoom-keys.md index 6e3d5bfcf..d5acf64ae 100644 --- a/.changeset/digit-row-zoom-keys.md +++ b/.changeset/digit-row-zoom-keys.md @@ -2,4 +2,4 @@ '@tanstack/hotkeys': patch --- -Control alone, or Command alone on macOS, with a digit-row key that types `-`, `+`, or `=` no longer fires the digit's hotkey. AZERTY types `-` on the 6 key, so Ctrl+- fired `Mod+6` and stopped the browser from zooming out. Czech and Slovak Ctrl++ on the 1 key fired `Mod+1` the same way. These presses now reach the browser. `Mod+6` still fires on AZERTY with Ctrl+Shift+6, which types `6`, and as `Mod+[Digit6]`. Presses with another modifier still fall back, so German Ctrl+Shift+0 (`=`) still fires `Mod+Shift+0`. +Control alone, or Command alone on macOS, with a digit-row key that types `-`, `+`, or `=` no longer fires the digit's hotkey. AZERTY types `-` on the 6 key, so Ctrl+- fired `Mod+6` and stopped the browser from zooming out. Czech and Slovak Ctrl++ on the 1 key fired `Mod+1` the same way. These presses now reach the browser. `Mod+6` still fires on AZERTY with Ctrl+Shift+6, which types `6`, and as `Mod+[Digit6]`. Presses with another modifier still fall back, so German Ctrl+Shift+0 (`=`) still fires `Mod+Shift+0`. A `keyup` hotkey now fires on the release of the key that started it, even when that key types something else by then, such as AZERTY 6 when Shift is released first. diff --git a/.changeset/sequence-lock-and-dead-keys.md b/.changeset/sequence-lock-and-dead-keys.md index 03b02b5ad..bc6eb2a15 100644 --- a/.changeset/sequence-lock-and-dead-keys.md +++ b/.changeset/sequence-lock-and-dead-keys.md @@ -2,4 +2,4 @@ '@tanstack/hotkeys': patch --- -CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. A dead key types its character together with the next key, and that key decides whether the sequence goes on. +CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. One that starts or completes another registered sequence still resets the others. A dead key types its character together with the next key, and that key decides whether the sequence goes on. diff --git a/.intent/review-state.json b/.intent/review-state.json index 0f63066dd..924ad4af5 100644 --- a/.intent/review-state.json +++ b/.intent/review-state.json @@ -94,16 +94,16 @@ ] }, "skill:packages/hotkeys/skills/hotkeys-core/SKILL.md": { - "fingerprint": "e45a5358aaf5266892afa4be7c170ce79e38a01d55f32b01d6cb46f4d7b87e3e", + "fingerprint": "50785d63beda5e392d370c0e7be8ab4b35ad7c15b005310038147bf34f0c79f3", "snapshot": { "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "d7bc646a409fa803dde08c6a51a10423e938bea6430c6b9fad454f7efa3f750c", - "docs/guides/sensible-defaults.md": "1018366d533d139324f6119cfe15c9bbab164912a63f4eb94dd0da3123189891", + "docs/framework/react/guides/sequences.md": "c9f701cf1af38e278807154ee5dc4e73cd64a935a28519a584e2374fb51e419a", + "docs/guides/sensible-defaults.md": "9b1e79689246f032cf76c3b7b799074fec30e6d19609806cdd28a9f5d366caa0", "packages/hotkeys/skills/hotkeys-core/SKILL.md": "2713cc5a05ecd000e9dbfacfd79192ad7b87bb80fdf54ddc8c1f50b90015a60c", "packages/hotkeys/skills/hotkeys-core/references/scopes.md": "1ae616ff7ce92d9679bbd0752ada572c2060c33ea7e7e638bfcc9d5425ac6bfa", "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", - "packages/hotkeys/src/hotkey-manager.ts": "3fb485c2c73a32ebca611e2c05aeb4bb6d9ff245ef8f9dec9c7b1304ae7e4c57", + "packages/hotkeys/src/hotkey-manager.ts": "9d44cc5c5e6054e721af5d1ffa9d3526fed2b03fed1970353a81dde46c25a149", "packages/hotkeys/src/match.ts": "6526a4efc625764a43b05db7df035e7fe38711f3e07ebd45be06c0d5dcc29786", "packages/react-hotkeys/tests/skills/editor-shortcuts/editor-shortcuts.test.tsx": "73411ec7c25652244ed31ad4120880dfc08d6e10af959bef04d2df5360769fde", "packages/react-hotkeys/tests/skills/editor-shortcuts/fixture.tsx": "613a833bb6412b600925deb4009d16cfbfe7afa9a5dc0b82d1a39b8da8c0230b", @@ -115,11 +115,11 @@ "packages/react-hotkeys/tests/skills/editor-shortcuts/solution.tsx": "ec81379bf0e3a9950222cf8525f82f8abefeb6b46339550fd3a8622e61bf4f0d", "packages/react-hotkeys/tests/skills/editor-shortcuts/task.md": "9610d80e7add59f0433cbf210562ff8c481dc2c14371ce31c00a329d9ff1fedf" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "skill:packages/lit-hotkeys/skills/lit-hotkeys/SKILL.md": { @@ -277,7 +277,7 @@ ] }, "planning:_artifacts": { - "fingerprint": "0662a509e6fb6345753fa72913c94e1969f594d6d2bdcc7fa6b25b2398d869f2", + "fingerprint": "65fd6cd03fb339509b46289f3dda52061ce27aea7c7dc72234915a4a28fb0d6a", "snapshot": { "_artifacts/domain_map.yaml": "9020ca258eebcb3575acad17ed5fc62d53306d6e07d6dc6456c006fd8f05f94b", "_artifacts/skill_spec.md": "3dfe15cd5f88bff08bfe9492e7487f709fcec25af7576a7e81729433e6d1ebef", @@ -299,7 +299,7 @@ "docs/framework/react/guides/custom-hotkey-recording.md": "b391a5b8f4186abb861e55d4ac592cd63d290d8f38f6f2efdae2bab07f34f4a0", "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "d7bc646a409fa803dde08c6a51a10423e938bea6430c6b9fad454f7efa3f750c", + "docs/framework/react/guides/sequences.md": "c9f701cf1af38e278807154ee5dc4e73cd64a935a28519a584e2374fb51e419a", "docs/framework/react/quick-start.md": "7bb88df3ccd9454127c41892d49317a4bd362e73e3bea50f9a339e00d342c4cc", "docs/framework/solid/guides/hotkeys-provider-and-scopes.md": "693ce66cace245cedc9a4dc4403766e8219abe07b51ac040208bb9acce9da4af", "docs/framework/solid/quick-start.md": "fef5577f2da3e25d3b202a4ce51d770ea55033e67eb5fdfa1d516d157658d394", @@ -307,7 +307,7 @@ "docs/framework/svelte/quick-start.md": "d84e2d8ad51c77abfa3eb8e0e920890b5301f93f0ba8f735c0588d266953d8b1", "docs/framework/vue/guides/hotkeys-provider-and-scopes.md": "0d9807ea50c5e85164b26fa7c9298c16a92b0b7d0e8bc08413e070c00241ef8c", "docs/framework/vue/quick-start.md": "36f2dd86551b0a08b33f7c439720027241a76d6e73aed60602fbee3f5c3d2782", - "docs/guides/sensible-defaults.md": "1018366d533d139324f6119cfe15c9bbab164912a63f4eb94dd0da3123189891", + "docs/guides/sensible-defaults.md": "9b1e79689246f032cf76c3b7b799074fec30e6d19609806cdd28a9f5d366caa0", "packages/alpine-hotkeys/skills/alpine-hotkeys/SKILL.md": "6e1357a1219003b43fa74242cb5671ab0aaf5c3ffd24dcad00f571f1bd829004", "packages/alpine-hotkeys/skills/alpine-hotkeys/references/app-hotkeys.md": "0fb12f409b5aec0999df3799f86d116b24d4d4d00131041e63d59264a7af1c98", "packages/alpine-hotkeys/src/createAppHotkeys.ts": "4b3745b96bdbf7971347bd930b9525b740abfffbd72dfed556d36cc0cbfa6757", @@ -340,7 +340,7 @@ "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", "packages/hotkeys/src/app-hotkeys.ts": "45b453c61aa4a762ad3f92fcb4f4fe0cb0dd636e8dc2f232f2a4fe4663159a3c", "packages/hotkeys/src/conflicts.ts": "005f63fdfa139d51203306ef9b3fb83ebf76ddd22553162a5262827a5e9d0921", - "packages/hotkeys/src/hotkey-manager.ts": "3fb485c2c73a32ebca611e2c05aeb4bb6d9ff245ef8f9dec9c7b1304ae7e4c57", + "packages/hotkeys/src/hotkey-manager.ts": "9d44cc5c5e6054e721af5d1ffa9d3526fed2b03fed1970353a81dde46c25a149", "packages/hotkeys/src/hotkey-recorder.ts": "dc53d33da84311cf851a8c51721fb5be892b008942a084c5ef301c9797f17d11", "packages/hotkeys/src/match.ts": "6526a4efc625764a43b05db7df035e7fe38711f3e07ebd45be06c0d5dcc29786", "packages/lit-hotkeys/skills/lit-hotkeys/SKILL.md": "2abef2d5efb7887b8737e661722eb3b5aa80f117666ac13e12c35a0de1c422af", @@ -408,11 +408,11 @@ "packages/vue-hotkeys/src/useHotkeyRecorder.ts": "20040667eec1bf86303fb6738985749c0db2f38db67fd9c34dd9ec1f52306899", "packages/vue-hotkeys/src/useHotkeys.ts": "a01bedb627cd6cad884cf59b2077c33b34289589e6a101fefb5ca1709dabb668" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:.changeset/intent-skills.md": { @@ -685,23 +685,23 @@ ] }, "source:docs/reference/classes/HotkeyManager.md": { - "fingerprint": "72723af77e2b7cdad65f5da3a609f1467d02b129b141a1dbf5e861918779c87a", + "fingerprint": "c227435c61f577ee8fc3f9faa4c15e8d54e900044dbf17693c4b994c783474ab", "snapshot": { - "docs/reference/classes/HotkeyManager.md": "6537cb6f57a95ae056d043e8b853fa572238a1161b3fb526ea07d5c815f563d4" + "docs/reference/classes/HotkeyManager.md": "2bb71e51940daeaf1b201f5ad461254ed4a62a2508b3017e2154532311e2a4ba" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "out-of-scope", - "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "reason": "Tests, real-layout cases, CI pins, or generated reference docs; no skill guidance depends on them.", "evidence": ["No skill references this file"] }, "source:docs/reference/functions/getHotkeyManager.md": { - "fingerprint": "d31e773ff6917694746d562aa9b86dfab6a9bb481c935ef2beeaaa900ab80934", + "fingerprint": "15bb18b1dacf8fe3bfde0cf40a02fc05805597ae8fe4195475bb58cd15e522c2", "snapshot": { - "docs/reference/functions/getHotkeyManager.md": "7e4a7d870d5837241c65057953482f9bcfe4538e369dd60dc7a94b68b82ae0a5" + "docs/reference/functions/getHotkeyManager.md": "982c3ffc131873ed0ef647ecef6465ff532a4022b333c69306d2399b1f3d9cb1" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "out-of-scope", - "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "reason": "Tests, real-layout cases, CI pins, or generated reference docs; no skill guidance depends on them.", "evidence": ["No skill references this file"] }, "source:examples/alpine/kitchen-sink/index.html": { @@ -1455,13 +1455,13 @@ ] }, "source:packages/hotkeys/tests/hotkey-manager.test.ts": { - "fingerprint": "4ec2e463ee11b9182fc4fd9a6fa708d4122c7085b62be8d8fb139eac0016cd53", + "fingerprint": "dee6e307a697f11cdc15a04129d12e28f67cb87242709cf33ac5889db444b925", "snapshot": { - "packages/hotkeys/tests/hotkey-manager.test.ts": "99b178a91ede18895c6fb623668629a5172c461d66bfc343e03a7b5a8435a9ca" + "packages/hotkeys/tests/hotkey-manager.test.ts": "bef14b954a4332c75b4271ee722a53d974e1bd972baf078124fbc3429512c516" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "out-of-scope", - "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "reason": "Tests, real-layout cases, CI pins, or generated reference docs; no skill guidance depends on them.", "evidence": ["No skill references this file"] }, "source:docs/framework/alpine/guides/cheat-sheet-ui-helpers.md": { @@ -7575,15 +7575,15 @@ ] }, "source:docs/framework/alpine/guides/sequences.md": { - "fingerprint": "5b57ff638e7e513142c3b4510ef53062a515a8e465e3fe7ca5ae42ff57dce227", + "fingerprint": "acca00b2e296017806590e0794f73697ca7e1d1ad751b9b66b378cc9e96ed3da", "snapshot": { - "docs/framework/alpine/guides/sequences.md": "5d613abb67a3d2724f2139e48060d764228a27748f13f77d51b5796063dbc42b" + "docs/framework/alpine/guides/sequences.md": "1ceaa43dabdf148b8ee01c0180bf35505e66fcbe4c363b818b3082301aaadbb5" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/alpine/reference/functions/createHotkeyRecorder.md": { @@ -11791,99 +11791,99 @@ ] }, "source:docs/framework/angular/guides/sequences.md": { - "fingerprint": "db89e250ee5c0eb053a96c088c0e77a793cacb22096d8691562a895192531c2d", + "fingerprint": "544d5747cab1f1a66e3a9e6acf9a2997e33af2fed908f0442e471c4d47897df2", "snapshot": { - "docs/framework/angular/guides/sequences.md": "52eaae5c6e4c62ee70a656d146eaaf33c16b00f48efdd1da771e963552a21f3a" + "docs/framework/angular/guides/sequences.md": "6fe97373bfbf9d2a0e56f0c93326c994ca1a0bd880418ed70724b51dead6881e" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/ember/guides/sequences.md": { - "fingerprint": "0145a8ebdc43a0f5e3d8df7bff389797efead4b86a29d9f48e3a1a1f17224692", + "fingerprint": "94ea2ebec5acaa1c01faf92385f19f057136ca1038a94ec534277cfefa504dbf", "snapshot": { - "docs/framework/ember/guides/sequences.md": "4427bd3afe797ed9997e63b2e24de7649b2508030843e98fcd1ad71c391ed57b" + "docs/framework/ember/guides/sequences.md": "b39855f742369d0a813c9edd4b3ca4915c924e5f156e4c22ab29a77be57a6877" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/lit/guides/sequences.md": { - "fingerprint": "4eb4eab90ad84d416bbf5f424631c309a163389fbb0a658dddd2e7a41ba7167e", + "fingerprint": "86e5b9d3747f159b019280bba89b6003e30d95b227b702b01543ba24ac2510ea", "snapshot": { - "docs/framework/lit/guides/sequences.md": "48fbb717b87194117be47be06cc320faae23d52e69fe41755276796433d74e09" + "docs/framework/lit/guides/sequences.md": "e1718fef0f18d423c089a8dbafef8b2e06a85baa06f76879c5122eb51839394b" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/octane/guides/sequences.md": { - "fingerprint": "65c785f2da697a77551538e0eb21fb56639011c6da63c5d6cb2127ab22417060", + "fingerprint": "5aa06a403cc183433e2222000028c4f4e163f6adab14ce50cee6ccd99dbc0388", "snapshot": { - "docs/framework/octane/guides/sequences.md": "0dafd58975dc5454a3f744606b2330d0109810c7bfa42d9acd93015d8c77e4bb" + "docs/framework/octane/guides/sequences.md": "acdab1b6f001e8cbbe31207480117b8f4b113a5179e060a8f737ee6aaa97a922" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/preact/guides/sequences.md": { - "fingerprint": "a399765c3406549cfb6bc1d97f7ed36d45206d593bb5a4119ffd14e4883aafe1", + "fingerprint": "6e46f56e91b0ddd58f26721763d90ee090a8ec3956d2aadd0ce7ecfb18c09921", "snapshot": { - "docs/framework/preact/guides/sequences.md": "fb2a8d14e239ac1cedb39b177defb35779120fa345845e15091e871b1d9c67c4" + "docs/framework/preact/guides/sequences.md": "6a2f1ec259b304fbef33977bc8b8694b83cba3213b57f03203c85f24f5c13a4c" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/solid/guides/sequences.md": { - "fingerprint": "f251a9fe0ea429910c5a47d8e5074d18bb45017015759ae57f9af85e8a5e494f", + "fingerprint": "2b38e808631d1b4a4c5e05c5a0c430e13ff0b5f51b9011a38eb7ba2f746813cb", "snapshot": { - "docs/framework/solid/guides/sequences.md": "c6b06fd8bfc54523b4667fbe4d3f4e944e48039c2b840409f51ad15a1f6f3c25" + "docs/framework/solid/guides/sequences.md": "e801b79f37347c924880ef4efd016930cad4bdb6e85c663e72128891a94515bd" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/svelte/guides/sequences.md": { - "fingerprint": "8857736d0cf5ebd8e5a936730989857130bcfabb1adc4d77ee4ea36186781c2e", + "fingerprint": "6e86c04742a674dd3713200457eb7ec28dc2288868eca46073fc2171ef19f849", "snapshot": { - "docs/framework/svelte/guides/sequences.md": "9eda0669ce4f39fd08ea052bfaab2ecedd5044d1f0f2f1818ccab319ee9b88c6" + "docs/framework/svelte/guides/sequences.md": "c99ab842bcdf9beb23ed6c716736481fd82194224439589004023a2599338a91" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:docs/framework/vue/guides/sequences.md": { - "fingerprint": "e80e06438e959c21e8048847134f646fd03e66d8a2545d119e1acbbc75482942", + "fingerprint": "1930e2f39c6ae7340e7580545690e6df2128cc6cc81de260ca79e92b6153aa65", "snapshot": { - "docs/framework/vue/guides/sequences.md": "df43413823ef26b7fd87c593bc0546b5d19db87d393b506d9651913bcc0a234f" + "docs/framework/vue/guides/sequences.md": "eb0acdbe12c19995cd9e5e166e856e83199b8bbdff5def39068b3df493a11f1e" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" ] }, "source:e2e/browser/chords.spec.ts": { diff --git a/docs/framework/alpine/guides/sequences.md b/docs/framework/alpine/guides/sequences.md index 79c6100c4..84edfc7c6 100644 --- a/docs/framework/alpine/guides/sequences.md +++ b/docs/framework/alpine/guides/sequences.md @@ -81,7 +81,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/angular/guides/sequences.md b/docs/framework/angular/guides/sequences.md index f552dcb44..73ca38f90 100644 --- a/docs/framework/angular/guides/sequences.md +++ b/docs/framework/angular/guides/sequences.md @@ -78,7 +78,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/ember/guides/sequences.md b/docs/framework/ember/guides/sequences.md index 18d5214e6..a2d121221 100644 --- a/docs/framework/ember/guides/sequences.md +++ b/docs/framework/ember/guides/sequences.md @@ -96,7 +96,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/lit/guides/sequences.md b/docs/framework/lit/guides/sequences.md index 78602ada9..017929a97 100644 --- a/docs/framework/lit/guides/sequences.md +++ b/docs/framework/lit/guides/sequences.md @@ -97,7 +97,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/octane/guides/sequences.md b/docs/framework/octane/guides/sequences.md index 80ecd3765..0a82a9907 100644 --- a/docs/framework/octane/guides/sequences.md +++ b/docs/framework/octane/guides/sequences.md @@ -76,7 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/preact/guides/sequences.md b/docs/framework/preact/guides/sequences.md index 91a7d3e29..95f654375 100644 --- a/docs/framework/preact/guides/sequences.md +++ b/docs/framework/preact/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/react/guides/sequences.md b/docs/framework/react/guides/sequences.md index 5fc12b227..a5a839c18 100644 --- a/docs/framework/react/guides/sequences.md +++ b/docs/framework/react/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/solid/guides/sequences.md b/docs/framework/solid/guides/sequences.md index a04b88e90..2921ea3c8 100644 --- a/docs/framework/solid/guides/sequences.md +++ b/docs/framework/solid/guides/sequences.md @@ -76,7 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/svelte/guides/sequences.md b/docs/framework/svelte/guides/sequences.md index 92dfc8673..185339f6b 100644 --- a/docs/framework/svelte/guides/sequences.md +++ b/docs/framework/svelte/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/vue/guides/sequences.md b/docs/framework/vue/guides/sequences.md index 75f24cf1d..292a4b603 100644 --- a/docs/framework/vue/guides/sequences.md +++ b/docs/framework/vue/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/guides/sensible-defaults.md b/docs/guides/sensible-defaults.md index 45edfc096..2b3368fc4 100644 --- a/docs/guides/sensible-defaults.md +++ b/docs/guides/sensible-defaults.md @@ -447,7 +447,7 @@ A sequence such as `['G', 'G']` completes when each step follows the previous on Sequences are forgiving in a few other ways: - **Pressing a modifier alone does not interrupt a sequence**, so steps can include modifiers: `['Shift+R', 'Shift+T']`. -- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. A dead key types its character together with the next key, so the next key decides whether the sequence goes on. +- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. One that starts or completes another sequence restarts this one, as any other key does. A dead key types its character together with the next key, so the next key decides whether the sequence goes on. - **Automatic repeats are not steps.** Holding `G` does not complete `['G', 'G']`. - **A wrong key restarts the sequence.** If the wrong key is the sequence's first step, it begins a new attempt, so `G X G G` still completes `['G', 'G']`. - **Progress clears when the timeout passes**, without waiting for another key press, so a UI that shows the pressed steps clears on time. diff --git a/docs/reference/classes/HotkeyManager.md b/docs/reference/classes/HotkeyManager.md index c6449651f..3216696cd 100644 --- a/docs/reference/classes/HotkeyManager.md +++ b/docs/reference/classes/HotkeyManager.md @@ -139,7 +139,7 @@ manager.activateScope('dialog', { exclusive: { allow: ['global'] } }) destroy(): void; ``` -Defined in: [hotkey-manager.ts:1813](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1813) +Defined in: [hotkey-manager.ts:1817](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1817) Destroys the manager and removes all listeners. @@ -155,7 +155,7 @@ Destroys the manager and removes all listeners. getRegistrationCount(): number; ``` -Defined in: [hotkey-manager.ts:1745](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1745) +Defined in: [hotkey-manager.ts:1749](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1749) Gets the number of registered hotkeys, chords and sequences. @@ -171,7 +171,7 @@ Gets the number of registered hotkeys, chords and sequences. hasActiveRegistration(hotkey): boolean; ``` -Defined in: [hotkey-manager.ts:1783](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1783) +Defined in: [hotkey-manager.ts:1787](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1787) Checks whether a hotkey can fire now: at least one registration is enabled, in an active scope, and listening where key presses go. A @@ -205,7 +205,7 @@ True if a registration that can fire exists isRegistered(hotkey, target?): boolean; ``` -Defined in: [hotkey-manager.ts:1756](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1756) +Defined in: [hotkey-manager.ts:1760](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1760) Checks if a specific hotkey is registered. @@ -331,7 +331,7 @@ handle.unregister() resetSequenceProgress(): void; ``` -Defined in: [hotkey-manager.ts:1730](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1730) +Defined in: [hotkey-manager.ts:1734](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1734) Resets the progress of every in-progress sequence. diff --git a/docs/reference/functions/getHotkeyManager.md b/docs/reference/functions/getHotkeyManager.md index 9017895ce..525a851a9 100644 --- a/docs/reference/functions/getHotkeyManager.md +++ b/docs/reference/functions/getHotkeyManager.md @@ -9,7 +9,7 @@ title: getHotkeyManager function getHotkeyManager(): HotkeyManager; ``` -Defined in: [hotkey-manager.ts:1827](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1827) +Defined in: [hotkey-manager.ts:1831](https://github.com/TanStack/hotkeys/blob/main/packages/hotkeys/src/hotkey-manager.ts#L1831) Gets the singleton HotkeyManager instance. Convenience function for accessing the manager. diff --git a/packages/hotkeys/src/hotkey-manager.ts b/packages/hotkeys/src/hotkey-manager.ts index 6baa036fe..9406fdcb2 100644 --- a/packages/hotkeys/src/hotkey-manager.ts +++ b/packages/hotkeys/src/hotkey-manager.ts @@ -1315,8 +1315,12 @@ export class HotkeyManager { this.#pendingReleases.has(id) ) { result = matchKeyboardEvent(event, parsedChord, platform) + const pressed = this.#pendingReleases.get(id)?.identity?.code if ( result.matched || + // The pressed key's release, even if its character changed, such + // as AZERTY 6 with Shift released first, which then reports `-` + (pressed !== undefined && pressed !== '' && pressed === event.code) || // The other Control or Shift key may still hold the modifier down. (parsedChord.modifiers.includes(eventKey as CanonicalModifier) && !event.getModifierState(eventKey)) diff --git a/packages/hotkeys/tests/hotkey-manager.test.ts b/packages/hotkeys/tests/hotkey-manager.test.ts index 1c7d85413..12178dde8 100644 --- a/packages/hotkeys/tests/hotkey-manager.test.ts +++ b/packages/hotkeys/tests/hotkey-manager.test.ts @@ -1972,6 +1972,27 @@ describe('HotkeyManager edge cases', () => { }) describe('keyup chords', () => { + // AZERTY types 6 with Shift and - without it. With Shift released first, + // the 6 key's keyup reports Control+-, which alone would be zoom out. + it('fires on the release of the pressed key after its character changes', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register('Mod+6', callback, { + platform: 'linux', + eventType: 'keyup', + }) + const press = { code: 'Digit6', ctrlKey: true, target: document } + keydown({ ...press, key: '6', shiftKey: true }) + keyup({ + key: 'Shift', + code: 'ShiftLeft', + ctrlKey: true, + target: document, + }) + expect(callback).not.toHaveBeenCalled() + keyup({ ...press, key: '-' }) + expect(callback).toHaveBeenCalledOnce() + }) + it('prevents the keydown so the browser does not act on it', () => { const save = vi.fn() HotkeyManager.getInstance().register('Mod+S', save, { From dbc92d24d75b0799cd371a160c213d84e86c2757 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 21 Nov 2026 00:23:14 -0600 Subject: [PATCH 4/6] docs(hotkeys): Say that a lock or dead key matching another sequence's step resets the others --- .changeset/sequence-lock-and-dead-keys.md | 2 +- .intent/review-state.json | 122 +++++++++--------- docs/framework/alpine/guides/sequences.md | 2 +- docs/framework/angular/guides/sequences.md | 2 +- docs/framework/ember/guides/sequences.md | 2 +- docs/framework/lit/guides/sequences.md | 2 +- docs/framework/octane/guides/sequences.md | 2 +- docs/framework/preact/guides/sequences.md | 2 +- docs/framework/react/guides/sequences.md | 2 +- docs/framework/solid/guides/sequences.md | 2 +- docs/framework/svelte/guides/sequences.md | 2 +- docs/framework/vue/guides/sequences.md | 2 +- docs/guides/sensible-defaults.md | 2 +- .../hotkeys/tests/sequence-manager.test.ts | 14 ++ 14 files changed, 87 insertions(+), 73 deletions(-) diff --git a/.changeset/sequence-lock-and-dead-keys.md b/.changeset/sequence-lock-and-dead-keys.md index bc6eb2a15..30c7f2c92 100644 --- a/.changeset/sequence-lock-and-dead-keys.md +++ b/.changeset/sequence-lock-and-dead-keys.md @@ -2,4 +2,4 @@ '@tanstack/hotkeys': patch --- -CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. One that starts or completes another registered sequence still resets the others. A dead key types its character together with the next key, and that key decides whether the sequence goes on. +CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. One that matches a step of another registered sequence still resets the others. A dead key types its character together with the next key, and that key decides whether the sequence goes on. diff --git a/.intent/review-state.json b/.intent/review-state.json index 924ad4af5..be2dafd84 100644 --- a/.intent/review-state.json +++ b/.intent/review-state.json @@ -94,12 +94,12 @@ ] }, "skill:packages/hotkeys/skills/hotkeys-core/SKILL.md": { - "fingerprint": "50785d63beda5e392d370c0e7be8ab4b35ad7c15b005310038147bf34f0c79f3", + "fingerprint": "27def63199e0492c98a0f793d4ea2d3611f5ca517aed8726c676563d7c6f75fa", "snapshot": { "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "c9f701cf1af38e278807154ee5dc4e73cd64a935a28519a584e2374fb51e419a", - "docs/guides/sensible-defaults.md": "9b1e79689246f032cf76c3b7b799074fec30e6d19609806cdd28a9f5d366caa0", + "docs/framework/react/guides/sequences.md": "8384fd3f48220a6cd267416beed07e85350531510c668ac388475d9b12755645", + "docs/guides/sensible-defaults.md": "d0188c68d3e56cf7fc1e59bd30894acb16e9425ae267fb15a56784bfafde2271", "packages/hotkeys/skills/hotkeys-core/SKILL.md": "2713cc5a05ecd000e9dbfacfd79192ad7b87bb80fdf54ddc8c1f50b90015a60c", "packages/hotkeys/skills/hotkeys-core/references/scopes.md": "1ae616ff7ce92d9679bbd0752ada572c2060c33ea7e7e638bfcc9d5425ac6bfa", "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", @@ -115,11 +115,11 @@ "packages/react-hotkeys/tests/skills/editor-shortcuts/solution.tsx": "ec81379bf0e3a9950222cf8525f82f8abefeb6b46339550fd3a8622e61bf4f0d", "packages/react-hotkeys/tests/skills/editor-shortcuts/task.md": "9610d80e7add59f0433cbf210562ff8c481dc2c14371ce31c00a329d9ff1fedf" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "skill:packages/lit-hotkeys/skills/lit-hotkeys/SKILL.md": { @@ -277,7 +277,7 @@ ] }, "planning:_artifacts": { - "fingerprint": "65fd6cd03fb339509b46289f3dda52061ce27aea7c7dc72234915a4a28fb0d6a", + "fingerprint": "d6bbe72f75fedbd82a51c5bea321a7747d61544dd3d28af2eae8a42e15d4b47b", "snapshot": { "_artifacts/domain_map.yaml": "9020ca258eebcb3575acad17ed5fc62d53306d6e07d6dc6456c006fd8f05f94b", "_artifacts/skill_spec.md": "3dfe15cd5f88bff08bfe9492e7487f709fcec25af7576a7e81729433e6d1ebef", @@ -299,7 +299,7 @@ "docs/framework/react/guides/custom-hotkey-recording.md": "b391a5b8f4186abb861e55d4ac592cd63d290d8f38f6f2efdae2bab07f34f4a0", "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "c9f701cf1af38e278807154ee5dc4e73cd64a935a28519a584e2374fb51e419a", + "docs/framework/react/guides/sequences.md": "8384fd3f48220a6cd267416beed07e85350531510c668ac388475d9b12755645", "docs/framework/react/quick-start.md": "7bb88df3ccd9454127c41892d49317a4bd362e73e3bea50f9a339e00d342c4cc", "docs/framework/solid/guides/hotkeys-provider-and-scopes.md": "693ce66cace245cedc9a4dc4403766e8219abe07b51ac040208bb9acce9da4af", "docs/framework/solid/quick-start.md": "fef5577f2da3e25d3b202a4ce51d770ea55033e67eb5fdfa1d516d157658d394", @@ -307,7 +307,7 @@ "docs/framework/svelte/quick-start.md": "d84e2d8ad51c77abfa3eb8e0e920890b5301f93f0ba8f735c0588d266953d8b1", "docs/framework/vue/guides/hotkeys-provider-and-scopes.md": "0d9807ea50c5e85164b26fa7c9298c16a92b0b7d0e8bc08413e070c00241ef8c", "docs/framework/vue/quick-start.md": "36f2dd86551b0a08b33f7c439720027241a76d6e73aed60602fbee3f5c3d2782", - "docs/guides/sensible-defaults.md": "9b1e79689246f032cf76c3b7b799074fec30e6d19609806cdd28a9f5d366caa0", + "docs/guides/sensible-defaults.md": "d0188c68d3e56cf7fc1e59bd30894acb16e9425ae267fb15a56784bfafde2271", "packages/alpine-hotkeys/skills/alpine-hotkeys/SKILL.md": "6e1357a1219003b43fa74242cb5671ab0aaf5c3ffd24dcad00f571f1bd829004", "packages/alpine-hotkeys/skills/alpine-hotkeys/references/app-hotkeys.md": "0fb12f409b5aec0999df3799f86d116b24d4d4d00131041e63d59264a7af1c98", "packages/alpine-hotkeys/src/createAppHotkeys.ts": "4b3745b96bdbf7971347bd930b9525b740abfffbd72dfed556d36cc0cbfa6757", @@ -408,11 +408,11 @@ "packages/vue-hotkeys/src/useHotkeyRecorder.ts": "20040667eec1bf86303fb6738985749c0db2f38db67fd9c34dd9ec1f52306899", "packages/vue-hotkeys/src/useHotkeys.ts": "a01bedb627cd6cad884cf59b2077c33b34289589e6a101fefb5ca1709dabb668" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:.changeset/intent-skills.md": { @@ -6916,13 +6916,13 @@ ] }, "source:packages/hotkeys/tests/sequence-manager.test.ts": { - "fingerprint": "dec081a23e6618961bb232cc487273594deafe0bbabd84f73418f3bf18b401b2", + "fingerprint": "94ce516c5e958f1db781fbb628c297a96509ad31125bbe07c397105c61e3dc29", "snapshot": { - "packages/hotkeys/tests/sequence-manager.test.ts": "91fa31f933e1ee333cdf36d353e2fb53d38494b48aa3a08a8fb7163990d1fc9b" + "packages/hotkeys/tests/sequence-manager.test.ts": "0eab2f5e8578ca445990cab0ef8f295bba09113cf49c85447cda45d67fd7c0f4" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "out-of-scope", - "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "reason": "Tests for the matching fixes; no skill guidance depends on them.", "evidence": ["No skill references this file"] }, "source:docs/framework/angular/reference/functions/injectHotkey.md": { @@ -7575,15 +7575,15 @@ ] }, "source:docs/framework/alpine/guides/sequences.md": { - "fingerprint": "acca00b2e296017806590e0794f73697ca7e1d1ad751b9b66b378cc9e96ed3da", + "fingerprint": "a806f18e2e87a3398a39f72a86d114c7051f6930b34e7662e1203823c12d2b6e", "snapshot": { - "docs/framework/alpine/guides/sequences.md": "1ceaa43dabdf148b8ee01c0180bf35505e66fcbe4c363b818b3082301aaadbb5" + "docs/framework/alpine/guides/sequences.md": "5d84358f41b35f02f0f2098f2128b1724ea74ce39cf0cec09ea4e9c8c91ab44f" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/alpine/reference/functions/createHotkeyRecorder.md": { @@ -11791,99 +11791,99 @@ ] }, "source:docs/framework/angular/guides/sequences.md": { - "fingerprint": "544d5747cab1f1a66e3a9e6acf9a2997e33af2fed908f0442e471c4d47897df2", + "fingerprint": "73e6a1911d92c3a0d0ce51615949f0fa0bdc45db59c0e975f737e5e2e4bd3cc2", "snapshot": { - "docs/framework/angular/guides/sequences.md": "6fe97373bfbf9d2a0e56f0c93326c994ca1a0bd880418ed70724b51dead6881e" + "docs/framework/angular/guides/sequences.md": "d31996fe5e24095e6448171b358ba7786ab1beea4a4b547602f45955a2faeb5a" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/ember/guides/sequences.md": { - "fingerprint": "94ea2ebec5acaa1c01faf92385f19f057136ca1038a94ec534277cfefa504dbf", + "fingerprint": "ca9f68f4306f015504ede62d2fb53b0a4140fab618b5b084eeb3a1932bcc5cec", "snapshot": { - "docs/framework/ember/guides/sequences.md": "b39855f742369d0a813c9edd4b3ca4915c924e5f156e4c22ab29a77be57a6877" + "docs/framework/ember/guides/sequences.md": "72dd38ead1c5b049d280421c08c0b6f2e754440effe1e2b60c41a7874c910dd5" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/lit/guides/sequences.md": { - "fingerprint": "86e5b9d3747f159b019280bba89b6003e30d95b227b702b01543ba24ac2510ea", + "fingerprint": "6e7fabb9499a797b4fd26ecce90604a3b20fcc44a9edecc00e629c54d655e594", "snapshot": { - "docs/framework/lit/guides/sequences.md": "e1718fef0f18d423c089a8dbafef8b2e06a85baa06f76879c5122eb51839394b" + "docs/framework/lit/guides/sequences.md": "d153392fe560b9b4a9cdce2873420c36c23a7435dfaf49a47b2499cf2f54669a" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/octane/guides/sequences.md": { - "fingerprint": "5aa06a403cc183433e2222000028c4f4e163f6adab14ce50cee6ccd99dbc0388", + "fingerprint": "727925770b01f40a02bd663bdc19b8f8a5f9096bffa591b405c5b0d63b1129f3", "snapshot": { - "docs/framework/octane/guides/sequences.md": "acdab1b6f001e8cbbe31207480117b8f4b113a5179e060a8f737ee6aaa97a922" + "docs/framework/octane/guides/sequences.md": "f63b4ef136a2fab93cd5af42c1228fa9d0520185503d8758e44594c3f6c0c309" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/preact/guides/sequences.md": { - "fingerprint": "6e46f56e91b0ddd58f26721763d90ee090a8ec3956d2aadd0ce7ecfb18c09921", + "fingerprint": "a9e96aa1ca7d2a518a51c90a3995cab6a6c5cc0dda76a12ad9ff0c2c69630f76", "snapshot": { - "docs/framework/preact/guides/sequences.md": "6a2f1ec259b304fbef33977bc8b8694b83cba3213b57f03203c85f24f5c13a4c" + "docs/framework/preact/guides/sequences.md": "0e7e2445fa09f4be9a310ab520f51d0ea36d6a68e87cfb36c4cb6cf95b7cc098" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/solid/guides/sequences.md": { - "fingerprint": "2b38e808631d1b4a4c5e05c5a0c430e13ff0b5f51b9011a38eb7ba2f746813cb", + "fingerprint": "52ae043524b385ec8a57f183ddd709512c1e6e1f36876a1ccdcf8319f5744963", "snapshot": { - "docs/framework/solid/guides/sequences.md": "e801b79f37347c924880ef4efd016930cad4bdb6e85c663e72128891a94515bd" + "docs/framework/solid/guides/sequences.md": "bce1514819c589c128c9567f1f33c2285d65bd4ad8aeb9e9d8339e10ba1abee4" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/svelte/guides/sequences.md": { - "fingerprint": "6e86c04742a674dd3713200457eb7ec28dc2288868eca46073fc2171ef19f849", + "fingerprint": "33f339b99c9ea3d38cc2d026d0370199c6998f45939118b8e0771e14607021d5", "snapshot": { - "docs/framework/svelte/guides/sequences.md": "c99ab842bcdf9beb23ed6c716736481fd82194224439589004023a2599338a91" + "docs/framework/svelte/guides/sequences.md": "d8dcf7824e46da764618a42779738022494ef8328d4110d3f18acdffd5f5be54" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/vue/guides/sequences.md": { - "fingerprint": "1930e2f39c6ae7340e7580545690e6df2128cc6cc81de260ca79e92b6153aa65", + "fingerprint": "15b6ce5d2067b2fc4f357e418e5fc96afefe618e9a00d9abca3387a16f56a5c4", "snapshot": { - "docs/framework/vue/guides/sequences.md": "eb0acdbe12c19995cd9e5e166e856e83199b8bbdff5def39068b3df493a11f1e" + "docs/framework/vue/guides/sequences.md": "93a4830120ce10783f6dfab28f96a54f5186a2e8852be702f7d8cf1c5cf7df18" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "8defa512828757067b9d6116441f2d71110f0a3d", "outcome": "no-change", - "reason": "Digit-row zoom keys, keyup release by key position, and lock or dead keys between sequence steps. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", + "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:e2e/browser/chords.spec.ts": { diff --git a/docs/framework/alpine/guides/sequences.md b/docs/framework/alpine/guides/sequences.md index 84edfc7c6..10aa8bc10 100644 --- a/docs/framework/alpine/guides/sequences.md +++ b/docs/framework/alpine/guides/sequences.md @@ -81,7 +81,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/angular/guides/sequences.md b/docs/framework/angular/guides/sequences.md index 73ca38f90..dc929e1e7 100644 --- a/docs/framework/angular/guides/sequences.md +++ b/docs/framework/angular/guides/sequences.md @@ -78,7 +78,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/ember/guides/sequences.md b/docs/framework/ember/guides/sequences.md index a2d121221..146fe7d89 100644 --- a/docs/framework/ember/guides/sequences.md +++ b/docs/framework/ember/guides/sequences.md @@ -96,7 +96,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/lit/guides/sequences.md b/docs/framework/lit/guides/sequences.md index 017929a97..65d55b0fc 100644 --- a/docs/framework/lit/guides/sequences.md +++ b/docs/framework/lit/guides/sequences.md @@ -97,7 +97,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/octane/guides/sequences.md b/docs/framework/octane/guides/sequences.md index 0a82a9907..74830e77f 100644 --- a/docs/framework/octane/guides/sequences.md +++ b/docs/framework/octane/guides/sequences.md @@ -76,7 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/preact/guides/sequences.md b/docs/framework/preact/guides/sequences.md index 95f654375..4149a41be 100644 --- a/docs/framework/preact/guides/sequences.md +++ b/docs/framework/preact/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/react/guides/sequences.md b/docs/framework/react/guides/sequences.md index a5a839c18..54897da16 100644 --- a/docs/framework/react/guides/sequences.md +++ b/docs/framework/react/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/solid/guides/sequences.md b/docs/framework/solid/guides/sequences.md index 2921ea3c8..c66e61343 100644 --- a/docs/framework/solid/guides/sequences.md +++ b/docs/framework/solid/guides/sequences.md @@ -76,7 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/svelte/guides/sequences.md b/docs/framework/svelte/guides/sequences.md index 185339f6b..1a0869769 100644 --- a/docs/framework/svelte/guides/sequences.md +++ b/docs/framework/svelte/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/vue/guides/sequences.md b/docs/framework/vue/guides/sequences.md index 292a4b603..33ac64663 100644 --- a/docs/framework/vue/guides/sequences.md +++ b/docs/framework/vue/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they start or complete another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/guides/sensible-defaults.md b/docs/guides/sensible-defaults.md index 2b3368fc4..d8c33afc2 100644 --- a/docs/guides/sensible-defaults.md +++ b/docs/guides/sensible-defaults.md @@ -447,7 +447,7 @@ A sequence such as `['G', 'G']` completes when each step follows the previous on Sequences are forgiving in a few other ways: - **Pressing a modifier alone does not interrupt a sequence**, so steps can include modifiers: `['Shift+R', 'Shift+T']`. -- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. One that starts or completes another sequence restarts this one, as any other key does. A dead key types its character together with the next key, so the next key decides whether the sequence goes on. +- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. One that matches a step of another sequence restarts this one, as any other key does. A dead key types its character together with the next key, so the next key decides whether the sequence goes on. - **Automatic repeats are not steps.** Holding `G` does not complete `['G', 'G']`. - **A wrong key restarts the sequence.** If the wrong key is the sequence's first step, it begins a new attempt, so `G X G G` still completes `['G', 'G']`. - **Progress clears when the timeout passes**, without waiting for another key press, so a UI that shows the pressed steps clears on time. diff --git a/packages/hotkeys/tests/sequence-manager.test.ts b/packages/hotkeys/tests/sequence-manager.test.ts index d4b81f4f7..693ab7527 100644 --- a/packages/hotkeys/tests/sequence-manager.test.ts +++ b/packages/hotkeys/tests/sequence-manager.test.ts @@ -781,6 +781,20 @@ describe('HotkeyManager', () => { expect(letters).not.toHaveBeenCalled() }) + it('resets other sequences when a lock key advances one', () => { + const lock = vi.fn() + const letters = vi.fn() + const manager = HotkeyManager.getInstance() + manager.register(['G', 'CapsLock', 'X'], lock) + manager.register(['G', 'T'], letters) + + keydown({ key: 'g', code: 'KeyG', target: document }) + keydown({ key: 'CapsLock', code: 'CapsLock', target: document }) + keydown({ key: 't', code: 'KeyT', target: document }) + + expect(letters).not.toHaveBeenCalled() + }) + it('keeps a keyup sequence going across a CapsLock keyup', () => { const callback = vi.fn() HotkeyManager.getInstance().register(['G', 'T'], callback, { From 133548f44becbcb8327b123ed4196256d0838a13 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 21 Nov 2026 00:29:06 -0600 Subject: [PATCH 5/6] docs(hotkeys): Say that a dead key matching a step counts as that step --- .changeset/sequence-lock-and-dead-keys.md | 2 +- .intent/review-state.json | 92 +++++++++++----------- docs/framework/alpine/guides/sequences.md | 2 +- docs/framework/angular/guides/sequences.md | 2 +- docs/framework/ember/guides/sequences.md | 2 +- docs/framework/lit/guides/sequences.md | 2 +- docs/framework/octane/guides/sequences.md | 2 +- docs/framework/preact/guides/sequences.md | 2 +- docs/framework/react/guides/sequences.md | 2 +- docs/framework/solid/guides/sequences.md | 2 +- docs/framework/svelte/guides/sequences.md | 2 +- docs/framework/vue/guides/sequences.md | 2 +- docs/guides/sensible-defaults.md | 2 +- 13 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.changeset/sequence-lock-and-dead-keys.md b/.changeset/sequence-lock-and-dead-keys.md index 30c7f2c92..d2619a088 100644 --- a/.changeset/sequence-lock-and-dead-keys.md +++ b/.changeset/sequence-lock-and-dead-keys.md @@ -2,4 +2,4 @@ '@tanstack/hotkeys': patch --- -CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. One that matches a step of another registered sequence still resets the others. A dead key types its character together with the next key, and that key decides whether the sequence goes on. +CapsLock, NumLock, ScrollLock, Fn, FnLock, and dead keys no longer reset a sequence in progress. Each sends a keydown of its own, so pressing CapsLock or starting an accented letter between `G` and `T` broke `['G', 'T']`. These keys now count only when they match a step, in registered sequences and in `createSequenceMatcher`. One that matches a step of another registered sequence still resets the others. A dead key that matches no step leaves the sequence to the next key, which types its character. diff --git a/.intent/review-state.json b/.intent/review-state.json index be2dafd84..8b421a889 100644 --- a/.intent/review-state.json +++ b/.intent/review-state.json @@ -94,12 +94,12 @@ ] }, "skill:packages/hotkeys/skills/hotkeys-core/SKILL.md": { - "fingerprint": "27def63199e0492c98a0f793d4ea2d3611f5ca517aed8726c676563d7c6f75fa", + "fingerprint": "1b3401a1f8abdadf5f89d96e3585d3924c5bbcbbb27fc8fd45f4487c428efc61", "snapshot": { "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "8384fd3f48220a6cd267416beed07e85350531510c668ac388475d9b12755645", - "docs/guides/sensible-defaults.md": "d0188c68d3e56cf7fc1e59bd30894acb16e9425ae267fb15a56784bfafde2271", + "docs/framework/react/guides/sequences.md": "72a86d774d131b2a53d138730b822aa380147fea61696abde8a98825f64e2a8b", + "docs/guides/sensible-defaults.md": "712c8ca0ecaa490c6dc0adefe9f1421aa965fc4464c433f34379b13ebec0cac4", "packages/hotkeys/skills/hotkeys-core/SKILL.md": "2713cc5a05ecd000e9dbfacfd79192ad7b87bb80fdf54ddc8c1f50b90015a60c", "packages/hotkeys/skills/hotkeys-core/references/scopes.md": "1ae616ff7ce92d9679bbd0752ada572c2060c33ea7e7e638bfcc9d5425ac6bfa", "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", @@ -115,9 +115,9 @@ "packages/react-hotkeys/tests/skills/editor-shortcuts/solution.tsx": "ec81379bf0e3a9950222cf8525f82f8abefeb6b46339550fd3a8622e61bf4f0d", "packages/react-hotkeys/tests/skills/editor-shortcuts/task.md": "9610d80e7add59f0433cbf210562ff8c481dc2c14371ce31c00a329d9ff1fedf" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] @@ -277,7 +277,7 @@ ] }, "planning:_artifacts": { - "fingerprint": "d6bbe72f75fedbd82a51c5bea321a7747d61544dd3d28af2eae8a42e15d4b47b", + "fingerprint": "11a2bf28f651293bce938128f5d3427dda1ab3efa95696297fe197384744156f", "snapshot": { "_artifacts/domain_map.yaml": "9020ca258eebcb3575acad17ed5fc62d53306d6e07d6dc6456c006fd8f05f94b", "_artifacts/skill_spec.md": "3dfe15cd5f88bff08bfe9492e7487f709fcec25af7576a7e81729433e6d1ebef", @@ -299,7 +299,7 @@ "docs/framework/react/guides/custom-hotkey-recording.md": "b391a5b8f4186abb861e55d4ac592cd63d290d8f38f6f2efdae2bab07f34f4a0", "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", - "docs/framework/react/guides/sequences.md": "8384fd3f48220a6cd267416beed07e85350531510c668ac388475d9b12755645", + "docs/framework/react/guides/sequences.md": "72a86d774d131b2a53d138730b822aa380147fea61696abde8a98825f64e2a8b", "docs/framework/react/quick-start.md": "7bb88df3ccd9454127c41892d49317a4bd362e73e3bea50f9a339e00d342c4cc", "docs/framework/solid/guides/hotkeys-provider-and-scopes.md": "693ce66cace245cedc9a4dc4403766e8219abe07b51ac040208bb9acce9da4af", "docs/framework/solid/quick-start.md": "fef5577f2da3e25d3b202a4ce51d770ea55033e67eb5fdfa1d516d157658d394", @@ -307,7 +307,7 @@ "docs/framework/svelte/quick-start.md": "d84e2d8ad51c77abfa3eb8e0e920890b5301f93f0ba8f735c0588d266953d8b1", "docs/framework/vue/guides/hotkeys-provider-and-scopes.md": "0d9807ea50c5e85164b26fa7c9298c16a92b0b7d0e8bc08413e070c00241ef8c", "docs/framework/vue/quick-start.md": "36f2dd86551b0a08b33f7c439720027241a76d6e73aed60602fbee3f5c3d2782", - "docs/guides/sensible-defaults.md": "d0188c68d3e56cf7fc1e59bd30894acb16e9425ae267fb15a56784bfafde2271", + "docs/guides/sensible-defaults.md": "712c8ca0ecaa490c6dc0adefe9f1421aa965fc4464c433f34379b13ebec0cac4", "packages/alpine-hotkeys/skills/alpine-hotkeys/SKILL.md": "6e1357a1219003b43fa74242cb5671ab0aaf5c3ffd24dcad00f571f1bd829004", "packages/alpine-hotkeys/skills/alpine-hotkeys/references/app-hotkeys.md": "0fb12f409b5aec0999df3799f86d116b24d4d4d00131041e63d59264a7af1c98", "packages/alpine-hotkeys/src/createAppHotkeys.ts": "4b3745b96bdbf7971347bd930b9525b740abfffbd72dfed556d36cc0cbfa6757", @@ -408,9 +408,9 @@ "packages/vue-hotkeys/src/useHotkeyRecorder.ts": "20040667eec1bf86303fb6738985749c0db2f38db67fd9c34dd9ec1f52306899", "packages/vue-hotkeys/src/useHotkeys.ts": "a01bedb627cd6cad884cf59b2077c33b34289589e6a101fefb5ca1709dabb668" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] @@ -7575,13 +7575,13 @@ ] }, "source:docs/framework/alpine/guides/sequences.md": { - "fingerprint": "a806f18e2e87a3398a39f72a86d114c7051f6930b34e7662e1203823c12d2b6e", + "fingerprint": "8caaea197f8d0db3f374c154919462514a7da613942ab96a00bd6980fa6aeb69", "snapshot": { - "docs/framework/alpine/guides/sequences.md": "5d84358f41b35f02f0f2098f2128b1724ea74ce39cf0cec09ea4e9c8c91ab44f" + "docs/framework/alpine/guides/sequences.md": "99b9904d4b32dbbf84c0dd8bdcabaddf87c5780ddf7da67a9b8a93a82bdc012f" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] @@ -11791,97 +11791,97 @@ ] }, "source:docs/framework/angular/guides/sequences.md": { - "fingerprint": "73e6a1911d92c3a0d0ce51615949f0fa0bdc45db59c0e975f737e5e2e4bd3cc2", + "fingerprint": "bccec4efa3a06426bf6e3828e9081c85d60828fef4026978e3f4eb41c99b4469", "snapshot": { - "docs/framework/angular/guides/sequences.md": "d31996fe5e24095e6448171b358ba7786ab1beea4a4b547602f45955a2faeb5a" + "docs/framework/angular/guides/sequences.md": "364892b4c265aa605f6fa5af696c7ab41d71f6e56b2460b2c0346dccd755cdfe" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/ember/guides/sequences.md": { - "fingerprint": "ca9f68f4306f015504ede62d2fb53b0a4140fab618b5b084eeb3a1932bcc5cec", + "fingerprint": "1f2ad3d6f613fa23a590b7b72d1a62a8b1f29eecd3b5aa4628b08c4790e04c7c", "snapshot": { - "docs/framework/ember/guides/sequences.md": "72dd38ead1c5b049d280421c08c0b6f2e754440effe1e2b60c41a7874c910dd5" + "docs/framework/ember/guides/sequences.md": "66469480ba2b65fc7d430c4f529ad31cf11b4d4f321c2545676fd762364cd7ed" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/lit/guides/sequences.md": { - "fingerprint": "6e7fabb9499a797b4fd26ecce90604a3b20fcc44a9edecc00e629c54d655e594", + "fingerprint": "7e611cfc9cdcd90b6a4b07d10ead7d8255b23887f090e2f784732afd35c29190", "snapshot": { - "docs/framework/lit/guides/sequences.md": "d153392fe560b9b4a9cdce2873420c36c23a7435dfaf49a47b2499cf2f54669a" + "docs/framework/lit/guides/sequences.md": "fe5a0cb73e2e55ab18c4f881346e50bd76399a2b408f8d95963dfe74e985e54b" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/octane/guides/sequences.md": { - "fingerprint": "727925770b01f40a02bd663bdc19b8f8a5f9096bffa591b405c5b0d63b1129f3", + "fingerprint": "7df55466901cee38ed24bd9aad96f5c6a48838eb642ae8ec8c2b8e26d9ddb21e", "snapshot": { - "docs/framework/octane/guides/sequences.md": "f63b4ef136a2fab93cd5af42c1228fa9d0520185503d8758e44594c3f6c0c309" + "docs/framework/octane/guides/sequences.md": "51a133a0eaf55261beceac822d6ff13065a2df51ff282117d2ab3a00a0d53e62" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/preact/guides/sequences.md": { - "fingerprint": "a9e96aa1ca7d2a518a51c90a3995cab6a6c5cc0dda76a12ad9ff0c2c69630f76", + "fingerprint": "56e0c2b27fbe31ffa3e2c7e477ea139809a262b5b9ad4b65fa893ae0d2656252", "snapshot": { - "docs/framework/preact/guides/sequences.md": "0e7e2445fa09f4be9a310ab520f51d0ea36d6a68e87cfb36c4cb6cf95b7cc098" + "docs/framework/preact/guides/sequences.md": "bbe9cb79363c4b0274bcc1abe1bcae6f7a781f61a4a18dfc306e85f44d5d6715" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/solid/guides/sequences.md": { - "fingerprint": "52ae043524b385ec8a57f183ddd709512c1e6e1f36876a1ccdcf8319f5744963", + "fingerprint": "12c095a569f7d9f7938936967189e5688c8c306567d25fdf08ac4a5c92e1071a", "snapshot": { - "docs/framework/solid/guides/sequences.md": "bce1514819c589c128c9567f1f33c2285d65bd4ad8aeb9e9d8339e10ba1abee4" + "docs/framework/solid/guides/sequences.md": "55361eb8c5b5c2884b66ada573753e561b02b8950a2080df16925305aa199d57" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/svelte/guides/sequences.md": { - "fingerprint": "33f339b99c9ea3d38cc2d026d0370199c6998f45939118b8e0771e14607021d5", + "fingerprint": "1a6168bf36811b04465fde39c6002e1b4b90685003320d24b098fa5aef3fa4d7", "snapshot": { - "docs/framework/svelte/guides/sequences.md": "d8dcf7824e46da764618a42779738022494ef8328d4110d3f18acdffd5f5be54" + "docs/framework/svelte/guides/sequences.md": "bde6f77e8f11d359f094553aeabb7efcd2caf0c35dc23f69de98a3dc361cd6b1" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] }, "source:docs/framework/vue/guides/sequences.md": { - "fingerprint": "15b6ce5d2067b2fc4f357e418e5fc96afefe618e9a00d9abca3387a16f56a5c4", + "fingerprint": "15c5e3a3508cd95374235539093207c7b1cc5c1e26eff658fb49297365b1f742", "snapshot": { - "docs/framework/vue/guides/sequences.md": "93a4830120ce10783f6dfab28f96a54f5186a2e8852be702f7d8cf1c5cf7df18" + "docs/framework/vue/guides/sequences.md": "1a94c5c1e19274125a7cfceed76803a93faf2e8c7e837b9a5630343e2b0ac713" }, - "head": "8defa512828757067b9d6116441f2d71110f0a3d", + "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", "outcome": "no-change", - "reason": "Wording of when lock or dead keys reset other sequences. The core skill gives no guidance on keys between sequence steps.", + "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", "evidence": [ "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" ] diff --git a/docs/framework/alpine/guides/sequences.md b/docs/framework/alpine/guides/sequences.md index 10aa8bc10..515ba8a8c 100644 --- a/docs/framework/alpine/guides/sequences.md +++ b/docs/framework/alpine/guides/sequences.md @@ -81,7 +81,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/angular/guides/sequences.md b/docs/framework/angular/guides/sequences.md index dc929e1e7..9bd460b32 100644 --- a/docs/framework/angular/guides/sequences.md +++ b/docs/framework/angular/guides/sequences.md @@ -78,7 +78,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/ember/guides/sequences.md b/docs/framework/ember/guides/sequences.md index 146fe7d89..24cf6796c 100644 --- a/docs/framework/ember/guides/sequences.md +++ b/docs/framework/ember/guides/sequences.md @@ -96,7 +96,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/lit/guides/sequences.md b/docs/framework/lit/guides/sequences.md index 65d55b0fc..cf7632f71 100644 --- a/docs/framework/lit/guides/sequences.md +++ b/docs/framework/lit/guides/sequences.md @@ -97,7 +97,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/octane/guides/sequences.md b/docs/framework/octane/guides/sequences.md index 74830e77f..03c946b62 100644 --- a/docs/framework/octane/guides/sequences.md +++ b/docs/framework/octane/guides/sequences.md @@ -76,7 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/preact/guides/sequences.md b/docs/framework/preact/guides/sequences.md index 4149a41be..f2b7058c2 100644 --- a/docs/framework/preact/guides/sequences.md +++ b/docs/framework/preact/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/react/guides/sequences.md b/docs/framework/react/guides/sequences.md index 54897da16..7616bdede 100644 --- a/docs/framework/react/guides/sequences.md +++ b/docs/framework/react/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/solid/guides/sequences.md b/docs/framework/solid/guides/sequences.md index c66e61343..8603fc528 100644 --- a/docs/framework/solid/guides/sequences.md +++ b/docs/framework/solid/guides/sequences.md @@ -76,7 +76,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/svelte/guides/sequences.md b/docs/framework/svelte/guides/sequences.md index 1a0869769..c671c943b 100644 --- a/docs/framework/svelte/guides/sequences.md +++ b/docs/framework/svelte/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/framework/vue/guides/sequences.md b/docs/framework/vue/guides/sequences.md index 33ac64663..098e1b692 100644 --- a/docs/framework/vue/guides/sequences.md +++ b/docs/framework/vue/guides/sequences.md @@ -74,7 +74,7 @@ While the user works through a sequence: - A key that doesn't continue the sequence starts it over. If that key is the sequence's first step, it begins a new attempt, so `G X G G` completes `['G', 'G']`. - Holding a key doesn't count as pressing it again, so holding `G` doesn't complete `['G', 'G']`. - Pressing a modifier alone, such as Shift, neither advances the sequence nor starts it over. -- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key types its character together with the next key, so the next key decides. +- Lock keys such as CapsLock and NumLock, Fn, and dead keys count only when they match a step. Otherwise they don't start the sequence over, unless they match a step of another sequence. A dead key that matches no step leaves the sequence to the next key, which types its character. [Sequences allow 1 second between steps](../../../guides/sensible-defaults.md#sequences-allow-1-second-between-steps) explains the default. diff --git a/docs/guides/sensible-defaults.md b/docs/guides/sensible-defaults.md index d8c33afc2..b1b2f5062 100644 --- a/docs/guides/sensible-defaults.md +++ b/docs/guides/sensible-defaults.md @@ -447,7 +447,7 @@ A sequence such as `['G', 'G']` completes when each step follows the previous on Sequences are forgiving in a few other ways: - **Pressing a modifier alone does not interrupt a sequence**, so steps can include modifiers: `['Shift+R', 'Shift+T']`. -- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. One that matches a step of another sequence restarts this one, as any other key does. A dead key types its character together with the next key, so the next key decides whether the sequence goes on. +- **Lock keys such as CapsLock and NumLock, Fn, and dead keys do not interrupt a sequence.** They count only when they match a step. One that matches a step of another sequence restarts this one, as any other key does. A dead key that matches no step leaves the sequence to the next key, which types its character. - **Automatic repeats are not steps.** Holding `G` does not complete `['G', 'G']`. - **A wrong key restarts the sequence.** If the wrong key is the sequence's first step, it begins a new attempt, so `G X G G` still completes `['G', 'G']`. - **Progress clears when the timeout passes**, without waiting for another key press, so a UI that shows the pressed steps clears on time. From 7d7987cd3aa0a01565debdc06bcfb104a59d0889 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sat, 21 Nov 2026 01:37:13 -0600 Subject: [PATCH 6/6] fix(hotkeys): Fall back for a space typed on the digit row, and document the zoom-key and AltGr limits macOS Spanish Option+Shift+6 types a space, which normalizes to `Space`, so the digit-row fallback skipped it and `Alt+Shift+6` could not fire. The digit row now stands in before the printable-key check. A unit test pins that a keyup hotkey for a shifted symbol, such as `?`, fires on its key's release after Shift comes up first, which the release-by-code change fixed; the changeset now says so. Sensible Defaults notes that Thai and Programmer Dvorak need a physical binding such as `Mod+[Digit3]` for a digit whose key types a zoom character, and that AltGr typing an ASCII letter or digit counts as typing nothing new. --- .changeset/digit-row-zoom-keys.md | 2 +- .intent/review-state.json | 46 +++++++++---------- docs/guides/sensible-defaults.md | 4 +- packages/hotkeys/src/_match.ts | 5 +- packages/hotkeys/tests/hotkey-manager.test.ts | 13 ++++++ packages/hotkeys/tests/match.test.ts | 11 +++++ 6 files changed, 53 insertions(+), 28 deletions(-) diff --git a/.changeset/digit-row-zoom-keys.md b/.changeset/digit-row-zoom-keys.md index d5acf64ae..5c6f4c3be 100644 --- a/.changeset/digit-row-zoom-keys.md +++ b/.changeset/digit-row-zoom-keys.md @@ -2,4 +2,4 @@ '@tanstack/hotkeys': patch --- -Control alone, or Command alone on macOS, with a digit-row key that types `-`, `+`, or `=` no longer fires the digit's hotkey. AZERTY types `-` on the 6 key, so Ctrl+- fired `Mod+6` and stopped the browser from zooming out. Czech and Slovak Ctrl++ on the 1 key fired `Mod+1` the same way. These presses now reach the browser. `Mod+6` still fires on AZERTY with Ctrl+Shift+6, which types `6`, and as `Mod+[Digit6]`. Presses with another modifier still fall back, so German Ctrl+Shift+0 (`=`) still fires `Mod+Shift+0`. A `keyup` hotkey now fires on the release of the key that started it, even when that key types something else by then, such as AZERTY 6 when Shift is released first. +Control alone, or Command alone on macOS, with a digit-row key that types `-`, `+`, or `=` no longer fires the digit's hotkey. AZERTY types `-` on the 6 key, so Ctrl+- fired `Mod+6` and stopped the browser from zooming out. Czech and Slovak Ctrl++ on the 1 key fired `Mod+1` the same way. These presses now reach the browser. `Mod+6` still fires on AZERTY with Ctrl+Shift+6, which types `6`, and as `Mod+[Digit6]`. Presses with another modifier still fall back, so German Ctrl+Shift+0 (`=`) still fires `Mod+Shift+0`. A `keyup` hotkey now fires on the release of the key that started it, even when that key types something else by then, such as AZERTY 6 when Shift is released first. Before, a `keyup` hotkey for a symbol typed with Shift, such as `?`, never fired when Shift came up before the key. A space typed on the digit row, as macOS Spanish Option+Shift+6 does, now falls back to the digit too. diff --git a/.intent/review-state.json b/.intent/review-state.json index 8b421a889..2b6bf5a91 100644 --- a/.intent/review-state.json +++ b/.intent/review-state.json @@ -94,12 +94,12 @@ ] }, "skill:packages/hotkeys/skills/hotkeys-core/SKILL.md": { - "fingerprint": "1b3401a1f8abdadf5f89d96e3585d3924c5bbcbbb27fc8fd45f4487c428efc61", + "fingerprint": "bdc3df1552fd8edf8c8bdfb09dd4e71026be4dba11c09b5246e38166e311b524", "snapshot": { "docs/framework/react/guides/hotkeys-provider-and-scopes.md": "afbf6da761c5c22b1daf919046fed679c2d35ac571f287c558aa66881c31f891", "docs/framework/react/guides/hotkeys.md": "891232579a1f0a24a84d27cab4ba793bc88cd2a2ada4b61a6690669902612388", "docs/framework/react/guides/sequences.md": "72a86d774d131b2a53d138730b822aa380147fea61696abde8a98825f64e2a8b", - "docs/guides/sensible-defaults.md": "712c8ca0ecaa490c6dc0adefe9f1421aa965fc4464c433f34379b13ebec0cac4", + "docs/guides/sensible-defaults.md": "0827154e9891a8cf78584a452934aa5a2a3caaedaa8063a45cd2456aa424ca71", "packages/hotkeys/skills/hotkeys-core/SKILL.md": "2713cc5a05ecd000e9dbfacfd79192ad7b87bb80fdf54ddc8c1f50b90015a60c", "packages/hotkeys/skills/hotkeys-core/references/scopes.md": "1ae616ff7ce92d9679bbd0752ada572c2060c33ea7e7e638bfcc9d5425ac6bfa", "packages/hotkeys/skills/hotkeys-core/references/testing.md": "62cffeecc4bc67b71e0cb0f744c7a3bdac12a97e3cbddae6365c67c91ad00645", @@ -115,11 +115,11 @@ "packages/react-hotkeys/tests/skills/editor-shortcuts/solution.tsx": "ec81379bf0e3a9950222cf8525f82f8abefeb6b46339550fd3a8622e61bf4f0d", "packages/react-hotkeys/tests/skills/editor-shortcuts/task.md": "9610d80e7add59f0433cbf210562ff8c481dc2c14371ce31c00a329d9ff1fedf" }, - "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", + "head": "133548f44becbcb8327b123ed4196256d0838a13", "outcome": "no-change", - "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", + "reason": "Digit-row fallback for a typed space, keyup release of shifted symbols, and guide notes for the Thai zoom-key trade-off and AltGr-typed ASCII. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or AltGr-typed digits" ] }, "skill:packages/lit-hotkeys/skills/lit-hotkeys/SKILL.md": { @@ -277,7 +277,7 @@ ] }, "planning:_artifacts": { - "fingerprint": "11a2bf28f651293bce938128f5d3427dda1ab3efa95696297fe197384744156f", + "fingerprint": "73ff29e87dad4cd77206ef256d15be34b362e5c14363bd89afac8bbee558eed0", "snapshot": { "_artifacts/domain_map.yaml": "9020ca258eebcb3575acad17ed5fc62d53306d6e07d6dc6456c006fd8f05f94b", "_artifacts/skill_spec.md": "3dfe15cd5f88bff08bfe9492e7487f709fcec25af7576a7e81729433e6d1ebef", @@ -307,7 +307,7 @@ "docs/framework/svelte/quick-start.md": "d84e2d8ad51c77abfa3eb8e0e920890b5301f93f0ba8f735c0588d266953d8b1", "docs/framework/vue/guides/hotkeys-provider-and-scopes.md": "0d9807ea50c5e85164b26fa7c9298c16a92b0b7d0e8bc08413e070c00241ef8c", "docs/framework/vue/quick-start.md": "36f2dd86551b0a08b33f7c439720027241a76d6e73aed60602fbee3f5c3d2782", - "docs/guides/sensible-defaults.md": "712c8ca0ecaa490c6dc0adefe9f1421aa965fc4464c433f34379b13ebec0cac4", + "docs/guides/sensible-defaults.md": "0827154e9891a8cf78584a452934aa5a2a3caaedaa8063a45cd2456aa424ca71", "packages/alpine-hotkeys/skills/alpine-hotkeys/SKILL.md": "6e1357a1219003b43fa74242cb5671ab0aaf5c3ffd24dcad00f571f1bd829004", "packages/alpine-hotkeys/skills/alpine-hotkeys/references/app-hotkeys.md": "0fb12f409b5aec0999df3799f86d116b24d4d4d00131041e63d59264a7af1c98", "packages/alpine-hotkeys/src/createAppHotkeys.ts": "4b3745b96bdbf7971347bd930b9525b740abfffbd72dfed556d36cc0cbfa6757", @@ -408,11 +408,11 @@ "packages/vue-hotkeys/src/useHotkeyRecorder.ts": "20040667eec1bf86303fb6738985749c0db2f38db67fd9c34dd9ec1f52306899", "packages/vue-hotkeys/src/useHotkeys.ts": "a01bedb627cd6cad884cf59b2077c33b34289589e6a101fefb5ca1709dabb668" }, - "head": "dbc92d24d75b0799cd371a160c213d84e86c2757", + "head": "133548f44becbcb8327b123ed4196256d0838a13", "outcome": "no-change", - "reason": "Wording of how a dead key between sequence steps behaves. The core skill gives no guidance on keys between sequence steps.", + "reason": "Digit-row fallback for a typed space, keyup release of shifted symbols, and guide notes for the Thai zoom-key trade-off and AltGr-typed ASCII. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or AltGr-typed digits" ] }, "source:.changeset/intent-skills.md": { @@ -1455,13 +1455,13 @@ ] }, "source:packages/hotkeys/tests/hotkey-manager.test.ts": { - "fingerprint": "dee6e307a697f11cdc15a04129d12e28f67cb87242709cf33ac5889db444b925", + "fingerprint": "58a3307cf48e6cb6cf6d09aa911b8731a5dbae538a922c5620498b72220ab698", "snapshot": { - "packages/hotkeys/tests/hotkey-manager.test.ts": "bef14b954a4332c75b4271ee722a53d974e1bd972baf078124fbc3429512c516" + "packages/hotkeys/tests/hotkey-manager.test.ts": "ba4377e7ecdf729cf09a987a8284e6a00063e3aaa5f27958ab7ff554be3f5ec8" }, - "head": "9037f6ef21aa3659b534474b93c24eb24ff5e9f0", + "head": "133548f44becbcb8327b123ed4196256d0838a13", "outcome": "out-of-scope", - "reason": "Tests, real-layout cases, CI pins, or generated reference docs; no skill guidance depends on them.", + "reason": "Tests or generated reference docs for the matching fixes; no skill guidance depends on them.", "evidence": ["No skill references this file"] }, "source:docs/framework/alpine/guides/cheat-sheet-ui-helpers.md": { @@ -4396,25 +4396,25 @@ "evidence": ["No skill references this file"] }, "source:packages/hotkeys/src/_match.ts": { - "fingerprint": "9d330caee48ffc68a8a395103d5f2bd2fabb4eadd66987b941c77da7399b9b23", + "fingerprint": "6dc04fde671a3c14b49f5c25e38d2ba5fe1f4c0bbcfd12bff93361e9d17178a0", "snapshot": { - "packages/hotkeys/src/_match.ts": "8099305db8c69426c901a32e24ceefb7da4bb9756356025bafd1d1fc3885ab0b" + "packages/hotkeys/src/_match.ts": "48ff9b334e59d173b593f4ca90ef30e3bf734f8fca6490a432f745b03b8057a4" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "133548f44becbcb8327b123ed4196256d0838a13", "outcome": "no-change", - "reason": "Digit-row zoom keys and lock or dead keys between sequence steps. The core skill gives no guidance on either, and an agent writes the same hotkeys before and after.", + "reason": "Digit-row fallback for a typed space, keyup release of shifted symbols, and guide notes for the Thai zoom-key trade-off and AltGr-typed ASCII. The core skill gives no guidance on these, and an agent writes the same hotkeys before and after.", "evidence": [ - "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback or keys between sequence steps" + "packages/hotkeys/skills/hotkeys-core/SKILL.md: no pitfall covers digit-row fallback, keyup release, or AltGr-typed digits" ] }, "source:packages/hotkeys/tests/match.test.ts": { - "fingerprint": "8ab197b2197b6cd2a340204abc01b7676548c5fa3324bed35cc88e9184ae7990", + "fingerprint": "ccd81b982c89f914f5fb17d20ceb6170434b8769465591f98dca40b85c1663a6", "snapshot": { - "packages/hotkeys/tests/match.test.ts": "7e737eca223874b927d618760b9723445b4ff4595da80b15393e50cd475aa64a" + "packages/hotkeys/tests/match.test.ts": "33c996cf6c2f386b255a8d97a4ce9ed9f7e7701a4c32e67501d39d0f9d54f29d" }, - "head": "182bcad4292b740de8425fb054cfdca805c50f17", + "head": "133548f44becbcb8327b123ed4196256d0838a13", "outcome": "out-of-scope", - "reason": "Tests, real-layout cases, or generated reference docs for the matching fixes; no skill guidance depends on them.", + "reason": "Tests or generated reference docs for the matching fixes; no skill guidance depends on them.", "evidence": ["No skill references this file"] }, "source:packages/hotkeys/tests/sequence-regressions.test.ts": { diff --git a/docs/guides/sensible-defaults.md b/docs/guides/sensible-defaults.md index b1b2f5062..8f57a3a6b 100644 --- a/docs/guides/sensible-defaults.md +++ b/docs/guides/sensible-defaults.md @@ -43,7 +43,7 @@ A logical binding such as `Mod+S` or `?` matches `event.key`, the character the - **Non-Latin layouts.** On a Russian layout, the S position types `ы`. `Mod+S` still matches there, so shortcuts work without switching layouts. - **macOS Option.** Option changes the character, so Option+S types `ß`. `Alt+S` still matches. It follows the letter printed on the key: on a French AZERTY Mac, `Alt+A` fires on the key labeled A, which sits in the US Q position. The matcher reads that letter from `event.keyCode`, and falls back to the key's position when `keyCode` names no letter. Option can also type an ASCII symbol on a letter key, such as `@` for German Option+L, and `Alt+L` still matches. -- **Dead keys and the digit row.** A dead key reports `Dead`, and AZERTY's digit row types `&` and `é` for `1` and `2`. The key's position resolves the shortcut, so `Mod+1` works on AZERTY. The exception is `-`, `+`, and `=` typed with Control alone, or Command alone on macOS, because those presses zoom the page. AZERTY types `-` on the 6 key, so Ctrl+- zooms out instead of firing `Mod+6`, and Ctrl+Shift+6 still fires `Mod+6`. +- **Dead keys and the digit row.** A dead key reports `Dead`, and AZERTY's digit row types `&` and `é` for `1` and `2`. The key's position resolves the shortcut, so `Mod+1` works on AZERTY. The exception is `-`, `+`, and `=` typed with Control alone, or Command alone on macOS, because those presses zoom the page. AZERTY types `-` on the 6 key, so Ctrl+- zooms out instead of firing `Mod+6`, and Ctrl+Shift+6 still fires `Mod+6`. A few layouts type no digit there with Shift either, such as Thai on the 3 key and Programmer Dvorak on the 6 and 9 keys. To keep that shortcut, also bind the key's position, such as `Mod+[Digit3]`. - **Symbols typed with Shift.** Shift+1 types `!` on a US layout, and `Shift+1` still matches. Otherwise, the character the key reports wins, wherever the key sits: @@ -124,7 +124,7 @@ Every hotkey needs a key that isn't a modifier. TypeScript rejects modifier-only Two kinds of key events never match ordinary shortcuts: -- **AltGr.** On Windows and Linux, AltGr types characters such as `@` and `€` on many layouts. A character it types matches a binding for that character, but never a `Control+Alt` shortcut, so typing an email address does not run a command. When AltGr+key types nothing new, such as AltGr+Home, or AltGr+F on a layout with nothing on that key, it does not fire `Home` or `F`. Windows reports AltGr as Control+Alt, so there it fires `Control+Alt` shortcuts instead: AltGr+Home triggers `Control+Alt+Home`, as in native Windows apps. +- **AltGr.** On Windows and Linux, AltGr types characters such as `@` and `€` on many layouts. A character it types matches a binding for that character, but never a `Control+Alt` shortcut, so typing an email address does not run a command. When AltGr+key types nothing new, such as AltGr+Home, or AltGr+F on a layout with nothing on that key, it does not fire `Home` or `F`. An ASCII letter or digit always counts as nothing new, because the event can't tell it apart from that AltGr+F. So on Lithuanian, which types digits with AltGr, AltGr+1 doesn't fire `1`, and the 1 key on its own does. Windows reports AltGr as Control+Alt, so there it fires `Control+Alt` shortcuts instead: AltGr+Home triggers `Control+Alt+Home`, as in native Windows apps. - **IME composition.** While the user composes text with an input method editor, such as for Japanese, Chinese, or Korean, no hotkey fires, because the editor uses those keys: Enter commits the text, Escape cancels it, and the arrow keys pick a candidate. This includes the Enter that Safari sends right after composition ends. ## Typing in inputs does not trigger shortcuts diff --git a/packages/hotkeys/src/_match.ts b/packages/hotkeys/src/_match.ts index 0d36f026f..b5bc6a8af 100644 --- a/packages/hotkeys/src/_match.ts +++ b/packages/hotkeys/src/_match.ts @@ -151,7 +151,8 @@ export function matchKeyboardEvent( * AZERTY rearrange, and numpad positions, whose output depends on NumLock. * Chrome on Linux Wayland reports Ctrl+` this way, and Firefox reports * numpad 5 with NumLock off this way. - * - anything on the digit row, where AZERTY types `&` and `é` for 1 and 2, + * - anything on the digit row, where AZERTY types `&` and `é` for 1 and 2 + * and macOS Spanish Option+Shift+6 types a space, * except `-`, `+` or `=` typed with only the platform's zoom modifier, * Control or macOS Command: AZERTY Ctrl+- on the 6 key is zoom out * - ASCII symbols typed with Shift, such as `!` for Shift+1 @@ -172,13 +173,13 @@ function positionStandsIn( platform: HotkeyPlatform, ): boolean { if (key === 'Unidentified') return !/^(Key|Numpad)/.test(code) - if (key !== 'Dead' && !isPrintableKey(key)) return false if (code.startsWith('Digit')) { // AZERTY types `-` on the 6 key, so Ctrl+- is zoom out, not Ctrl+6 const zoom = !shift && !alt && (platform === 'mac' ? meta && !ctrl : ctrl && !meta) return !zoom || !/^[-+=]$/.test(key) } + if (key !== 'Dead' && !isPrintableKey(key)) return false if (isAsciiLetter(key)) return false const letterKey = code.startsWith('Key') if (/^[!-~]$/.test(key)) { diff --git a/packages/hotkeys/tests/hotkey-manager.test.ts b/packages/hotkeys/tests/hotkey-manager.test.ts index 12178dde8..9b4913805 100644 --- a/packages/hotkeys/tests/hotkey-manager.test.ts +++ b/packages/hotkeys/tests/hotkey-manager.test.ts @@ -1993,6 +1993,19 @@ describe('HotkeyManager edge cases', () => { expect(callback).toHaveBeenCalledOnce() }) + it('fires a shifted symbol on its key release after Shift comes up first', () => { + const callback = vi.fn() + HotkeyManager.getInstance().register('?', callback, { + platform: 'linux', + eventType: 'keyup', + }) + keydown({ key: '?', code: 'Slash', shiftKey: true, target: document }) + keyup({ key: 'Shift', code: 'ShiftLeft', target: document }) + expect(callback).not.toHaveBeenCalled() + keyup({ key: '/', code: 'Slash', target: document }) + expect(callback).toHaveBeenCalledOnce() + }) + it('prevents the keydown so the browser does not act on it', () => { const save = vi.fn() HotkeyManager.getInstance().register('Mod+S', save, { diff --git a/packages/hotkeys/tests/match.test.ts b/packages/hotkeys/tests/match.test.ts index 69557a8cd..48eacc99a 100644 --- a/packages/hotkeys/tests/match.test.ts +++ b/packages/hotkeys/tests/match.test.ts @@ -1055,6 +1055,17 @@ describe('matchesKeyboardEvent', () => { ) }) }) + + // macOS Spanish Option+Shift+6 types a space + it('falls back for a space typed on the digit row', () => { + const event = createKeyboardEvent(' ', { + altKey: true, + shiftKey: true, + code: 'Digit6', + }) + expect(matchesKeyboardEvent(event, 'Alt+Shift+6', 'mac')).toBe(true) + expect(matchesKeyboardEvent(event, 'Alt+Shift+Space', 'mac')).toBe(true) + }) }) describe('Unicode normalization edge cases', () => {