Repository navigation
fix(web): a letter key that types a symbol no longer records as the symbol's own key - #47126
maria-rcks wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Shortcut recording and matching now distinguish letter keys that produce punctuation from the punctuation’s dedicated key. The adjustment is limited to layouts where that duplication is confirmed, with existing fallback behavior preserved. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
On a keyboard layout that types a symbol on a letter key while the symbol's own key still types it (#35787: a custom XKB layout with
.on the physical H key and on Period), Ctrl+H and Ctrl+. both recorded asmod+.in Settings > Keybindings. Amod+.binding fired on both keys and beat amod+hbinding on H. Reported on X: https://x.com/niknal0/status/2126529316561244460A letter key now resolves as its letter when the browser's keyboard layout map shows the symbol's own key types the same symbol. Recording and matching both use this rule, so H records and fires
mod+hand Period keepsmod+.. Layouts with only one key for the symbol keep it, so Dvorak's,on KeyW and AZERTY's,on KeyM still recordmod+,. Without a layout map (Firefox, Safari), behavior is unchanged.This follows up #36532 by @farseenmanekhan1232, which the conflict window closed. That PR resolved every symbol on a letter key as the letter, which would record Dvorak's comma as
mod+w, so this version gates the rule on the layout map and is rewritten against today's matcher.Before (main): Ctrl + physical H records
mod+.After: the same chord records
mod+hAfter: Ctrl + Period still records
mod+.Proof:
ctrlKey,key=".",code=KeyH/Period), layout map emulated per layout because headless Chromium has none (level 3). On main: H and Period both recordmod+., and withmod+handmod+.bound, H runs themod+.command. On head: H recordsmod+hand runs themod+hcommand, Period recordsmod+., and with onlymod+.bound, H runs nothing.,on KeyW recordsmod+,and runs amod+,binding, AZERTY,on KeyM recordsmod+,, Cyrillicиon KeyB recordsmod+b(fix(web): shortcuts recorded on a Cyrillic or Greek layout keep working on a Latin one #44275) andmod+alt+bwith Alt (fix(web): Alt shortcuts recorded on a non-Latin layout keep working on a Latin one #44978), and both still runmod+b/mod+alt+bbindings. Ctrl + a Cyrillic-layout letter still matches its Latin shortcut (fix(web): Cmd+K and Ctrl+L clear the terminal on non-Latin keyboard layouts #44082 area).keybindings.test.tsandKeybindingsSettings.logic.test.tsfail on main (expected 'thread.next' to equal 'thread.previous',expected 'mod+.' to be 'mod+h') and pass here (level 2).vp run check:changedpasses on Blacksmith.Surfaces: the shared matcher (
packages/shared) and the web recorder cover web and the desktop renderer. html_render previews and the desktop preview's main-process forwarding pre-filter keys without a layout map, so they may still forward H when onlymod+.is bound; the app's matcher then resolves it asmod+h, so the wrong command does not run. Mobile hardware-keyboard shortcuts are native key commands with fixed keys and no recorder, so they don't share this code.Not verified: a real XKB layout on Linux desktop (the layout map was emulated); the html_render and desktop preview forwarding paths; Firefox and Safari, which have no layout map and keep the old behavior.
Fixes #35787. Follows up #36532.
Written by
claude-opus-5-5in Claude Code, on behalf of Maria.🤖 Generated with Claude Code