Skip to content

feat: ⌘?/⌘/ multi-binding keybinding aliases (BACKLOG Standing #6) - #51

Merged
alicoding merged 1 commit into
mainfrom
feat/keybinding-aliases
Aug 13, 2026
Merged

feat: ⌘?/⌘/ multi-binding keybinding aliases (BACKLOG Standing #6)#51
alicoding merged 1 commit into
mainfrom
feat/keybinding-aliases

Conversation

@alicoding

Copy link
Copy Markdown
Owner

Summary

  • 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 (/) — shift-independent like every other key here, so ⌘/ vs ⌘? (Shift+/) is 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 are deliberately NOT override-checked this pass — Settings' rebinding UI still edits only the primary, extras render as read-only secondary KeyComboChips (views/KeyboardShortcutsSection.tsx).
  • SPEC.md + BACKLOG.md updated in the same change (Standing build(deps): Bump @wailsio/runtime from 3.0.0-beta.1 to 3.0.0-beta.5 in /frontend #6 checked off).

Test plan

  • npx tsc --noEmit
  • npm run lint (0 errors, pre-existing warnings only)
  • npx vitest run (260/260, including new dispatch/extras cases in commands.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)
  • Local lefthook pre-commit suite green

🤖 Generated with Claude Code

https://claude.ai/code/session_018pkViCNAuZp2vBv2K9AbUh

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
alicoding enabled auto-merge (squash) August 13, 2026 05:47
@alicoding
alicoding merged commit 71e630b into main Aug 13, 2026
16 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant