feat(keybinding): rebind Cmd+T to duplicate focused panel#3421
Merged
gregpriday merged 3 commits intodevelopfrom Mar 16, 2026
Merged
feat(keybinding): rebind Cmd+T to duplicate focused panel#3421gregpriday merged 3 commits intodevelopfrom
gregpriday merged 3 commits intodevelopfrom
Conversation
- Add terminal.duplicate to KeyAction union and KEY_ACTION_VALUES set - Bind Cmd+T to terminal.duplicate, move terminal.new to Cmd+Alt+T - Make terminal.duplicate argsSchema optional for keybinding dispatch - Add three-tier target resolution: focused → lone panel → new terminal - Update KeybindingService tests for new binding assignments - Add adversarial tests for keybinding path and fallback behavior
…tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use buildPanelDuplicateOptions for kind-specific state preservation - Preserve title "(copy)" suffix after building duplicate options - Update menu: Cmd+T → Duplicate Panel, Cmd+Alt+T → New Terminal - Add duplicate-panel menu action mapping in useMenuActions
7bd9ffe to
d249a99
Compare
Collaborator
Author
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
Cmd+T(macOS) /Ctrl+T(Windows/Linux) fromterminal.newto a newterminal.duplicateFocusedaction that clones the focused panel's kind and configuration into a fresh grid panelterminal.newis rebound toCmd+Shift+T/Ctrl+Shift+Tto vacate the slot without conflicting with any existing bindingsResolves #3415
Changes
shared/types/keymap.ts— addsterminal.duplicateFocusedto theKeyActionunionsrc/services/KeybindingService.ts— rebindsterminal.newtoCmd+Shift+Tand registersterminal.duplicateFocusedatCmd+Tsrc/services/actions/definitions/terminalActions.ts— addsterminal.duplicateFocusedaction usingpanelDuplicationService;buildPanelDuplicateOptionshelper derives spawn options from the source panel's kind, worktree, and agent typeelectron/menu.ts— updates the New Terminal menu item accelerator toCmdOrCtrl+Shift+Tsrc/hooks/useMenuActions.ts— wiresterminal.duplicateFocusedinto the menu action mapsrc/services/__tests__/KeybindingService.test.ts— updated tests for new binding assignmentssrc/services/actions/actionDefinitions.adversarial.test.ts— adversarial coverage for the duplicate action across all panel kinds, empty grid, and fallback scenariosTesting
Typecheck, lint ratchet (298 warnings, no new ones), and Prettier format check all pass. Unit tests cover the keybinding reassignment and the full
terminal.duplicateFocusedaction paths including terminal/agent/browser/notes/dev-preview kinds, the single-panel fallback, and the empty-grid no-op.