Repository navigation
feat(shortcuts): record chords with exact modifiers - #1151
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
Settings → Shortcuts records any chord with Ctrl, Alt or (on a Mac) ⌘, not only Mod+Shift, following the maintainer's direction in devswha#798. A Mod+Shift chord is still stored as its bare key. Chords the browser, the OS or text editing keep are refused; a plain Ctrl or Alt chord, which shells and agents use, is saved only after Save anyway (as suggested in devswha#798 by a user who wants Ctrl+K). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VoME51Ex6avEzqEBmkYzGd
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VoME51Ex6avEzqEBmkYzGd
…rs work on any layout Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VoME51Ex6avEzqEBmkYzGd
… every layout Home, End and the punctuation keys are bound with Record; a recorded one is listed as itself. A US character in the list would name another key on most layouts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VoME51Ex6avEzqEBmkYzGd
… on load Review follow-ups on the exact-modifier recorder: - a binding on Home or End gives way in a field with text, like the arrows; - settings drop a stored exact chord the recorder refuses on this platform; - Cmd+S and Cmd+Option+I/C/U ask before saving, like other browser chords; - the row's warning is a status region, and Save anyway/Cancel return focus to Record; - Reset clears a pending confirmation; macOS shows Ctrl as ⌃; - ko/zh wording follows each dictionary's glossary.
DESIGN.md and docs/terminal-input.md still said every app shortcut is Mod+Shift and only its final key changes. Record now keeps exact chords: reserved ones are refused, terminal and common browser chords save only after Save anyway (devswha#798).
0c03930 to
64e4b73
Compare
|
Thanks @kratam — this follows the direction in #798, so I've carried it over the line on your branch rather than waiting. Your four commits are kept as they were (authorship unchanged), rebased onto current
Left for follow-ups, since they predate this PR:
Verified locally: |
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
|
Change
Follows the direction in #798 and the note on #812: scoped on top of the recorder from #951.
meta+PageUp,alt+meta+b,ctrl+k) and shown that way in the row and the palette. A bare stored key still means Mod+Shift, so existing bindings are unchanged.KeyboardEvent.code), so it works on any layout: on a Hungarian keyboardÉis the;key. Letters still match the character typed, so AZERTY keeps its M. Where Chromium exposes the layout map, the row shows the user's own character.Commits are in order and each builds on the one before; the PR can be squashed.
Validation
bun run check fast: generated types, typecheck, build pass. Unit tests: 3748 pass;server/portal.test.tsfailed 2 timing tests in the parallel run and passes alone (31/0). This PR does not touchserver/.src/lib/shortcuts.test.tsandsrc/lib/shortcutRecorder.test.ts: exact chord storage and matching, refusals and risks per platform, macOS Option chords, Home/End, position-based punctuation (Hungarian, German, Russian; AZERTY M stays M), the dropdown key list.scripts/shortcut-exact-modifiers-demo-regression.ts(added toscripts/ci-browser.sh), on the demo: a safe exact chord is saved and dispatched, Ctrl+K needs Save anyway and Cancel saves nothing, refusals, End via Record shown in the dropdown, a Hungarian É bound by position, the default released after rebinding, from the message box and after a reload. PASS.🤖 Generated with Claude Code
https://claude.ai/code/session_01VoME51Ex6avEzqEBmkYzGd