Add terminal shortcut routing policy#2610
Merged
Merged
Conversation
a08fc55 to
9ce26f6
Compare
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
Follow-up to #2581. This keeps the new keybinding customization path, but makes terminal/TUI shortcut ownership explicit instead of changing the default behavior silently.
terminalShortcutPolicywith two modes:Orca first(default) andTerminal first(opt-in).Cmd+J,Cmd+P, and other app shortcuts still work from focused terminal/TUI sessions unless the user opts into Terminal-first.Orca first,Terminal first,Terminal,Terminal active).before-input-eventcan route shortcuts using the same policy as renderer handlers.terminalShortcutPolicyvalues back toorca-firston load/update.Behavior Notes
Review Notes / Risks
Validation
pnpm run typecheckpnpm run lintpnpm exec vitest run --config config/vitest.config.ts src/shared/keybindings.test.ts src/shared/window-shortcut-policy.test.ts src/renderer/src/components/terminal-pane/keyboard-handlers.test.ts src/main/window/createMainWindow.test.ts src/main/menu/register-app-menu.test.ts src/main/persistence.test.tspnpm test— 893 files passed, 1 skipped; 9347 tests passed, 10 skippedkeyboard, Shortcuts page policy dropdown, Terminal-first badge updates, and restored defaultOrca firstafterward. CDP keypress simulation did not reliably exercise Electronbefore-input-event, so native shortcut routing is covered by main-window tests.Related: #1493, #713, #891, #1502, #858, #1168