feat: ⌘?/⌘/ multi-binding keybinding aliases (BACKLOG Standing #6) - #51
Merged
Conversation
Command grows an optional extraBindings: KeyCombo[] alongside the existing 1:1 defaultBinding (shared/commands.ts, backward-compatible). shared/keybinding.ts's keyFromEventCode gains Slash support -- the '/' key is shift-independent like every other key here, so ⌘/ vs ⌘? (the Shift+/ glyph) is captured purely as a mod difference on the same physical key. palette.open carries both as extraBindings, checked against the full registry + RESERVED_COMBOS first (no collision -- nothing else uses '/'). dispatchCommandForEvent checks a command's effective (override- aware) primary plus its extras on every dispatch; extras themselves are deliberately not override-checked this pass -- Settings' recorder- based rebinding UI still edits only the primary, and extras render as read-only secondary KeyComboChips next to it (views/KeyboardShortcutsSection.tsx). Vitest covers dispatch-matches-either-binding, override-doesn't- disable-extras, and the no-extraBindings backward-compat case; keymap.spec.ts gained a live ⌘/ and ⌘⇧/ -> palette-opens case and a Settings-renders-the-two-read-only-chips case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018pkViCNAuZp2vBv2K9AbUh
alicoding
enabled auto-merge (squash)
August 13, 2026 05:47
alicoding
added a commit
that referenced
this pull request
Aug 15, 2026
Command grows an optional extraBindings: KeyCombo[] alongside the existing 1:1 defaultBinding (shared/commands.ts, backward-compatible). shared/keybinding.ts's keyFromEventCode gains Slash support -- the '/' key is shift-independent like every other key here, so ⌘/ vs ⌘? (the Shift+/ glyph) is captured purely as a mod difference on the same physical key. palette.open carries both as extraBindings, checked against the full registry + RESERVED_COMBOS first (no collision -- nothing else uses '/'). dispatchCommandForEvent checks a command's effective (override- aware) primary plus its extras on every dispatch; extras themselves are deliberately not override-checked this pass -- Settings' recorder- based rebinding UI still edits only the primary, and extras render as read-only secondary KeyComboChips next to it (views/KeyboardShortcutsSection.tsx). Vitest covers dispatch-matches-either-binding, override-doesn't- disable-extras, and the no-extraBindings backward-compat case; keymap.spec.ts gained a live ⌘/ and ⌘⇧/ -> palette-opens case and a Settings-renders-the-two-read-only-chips case. Claude-Session: https://claude.ai/code/session_018pkViCNAuZp2vBv2K9AbUh Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commandgrows an optionalextraBindings: KeyCombo[]alongside the existing 1:1defaultBinding(shared/commands.ts, backward-compatible).shared/keybinding.ts'skeyFromEventCodegainsSlashsupport (/) — shift-independent like every other key here, so ⌘/ vs ⌘? (Shift+/) is a mod difference on the same physical key.palette.opencarries both asextraBindings, checked against the full registry +RESERVED_COMBOSfirst — no collision, nothing else uses/.dispatchCommandForEventchecks a command's effective (override-aware) primary plus its extras on every dispatch; extras are deliberately NOT override-checked this pass — Settings' rebinding UI still edits only the primary, extras render as read-only secondaryKeyComboChips (views/KeyboardShortcutsSection.tsx).Test plan
npx tsc --noEmitnpm run lint(0 errors, pre-existing warnings only)npx vitest run(260/260, including new dispatch/extras cases incommands.test.ts+keybinding.test.ts)npm run boundaries(0 violations)npx playwright test e2e/keymap.spec.ts e2e/command-palette.spec.ts e2e/hotkey-hint.spec.ts(15/15, including the new live ⌘//⌘⇧/ → palette-opens case and the Settings-renders-extras case)🤖 Generated with Claude Code
https://claude.ai/code/session_018pkViCNAuZp2vBv2K9AbUh