Replace all hardcoded shortcut key rendering with useShortcutKeys() so rebound shortcuts always display correctly. Add Cmd+O (new worktree), Cmd+Shift+Backspace (archive worktree) with proper active-project scoping. Show shortcut hints in tooltips and dropdown menus. Fix tooltip alignment to center, bump dropdown menu surface level, simplify TerminalPane to single-terminal, and add special key display symbols.
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
export type KeyboardFocusScope =
|
|
| "terminal"
|
|
| "message-input"
|
|
| "command-center"
|
|
| "editable"
|
|
| "other";
|
|
|
|
export type MessageInputKeyboardActionKind =
|
|
| "focus"
|
|
| "send"
|
|
| "queue"
|
|
| "dictation-toggle"
|
|
| "dictation-cancel"
|
|
| "voice-toggle"
|
|
| "voice-mute-toggle";
|
|
|
|
export type KeyboardActionId =
|
|
| "agent.new"
|
|
| "workspace.tab.new"
|
|
| "workspace.tab.close.current"
|
|
| "workspace.tab.navigate.index"
|
|
| "workspace.tab.navigate.relative"
|
|
| "workspace.pane.split.right"
|
|
| "workspace.pane.split.down"
|
|
| "workspace.pane.focus.left"
|
|
| "workspace.pane.focus.right"
|
|
| "workspace.pane.focus.up"
|
|
| "workspace.pane.focus.down"
|
|
| "workspace.pane.move-tab.left"
|
|
| "workspace.pane.move-tab.right"
|
|
| "workspace.pane.move-tab.up"
|
|
| "workspace.pane.move-tab.down"
|
|
| "workspace.pane.close"
|
|
| "workspace.navigate.index"
|
|
| "workspace.navigate.relative"
|
|
| "sidebar.toggle.left"
|
|
| "sidebar.toggle.right"
|
|
| "command-center.toggle"
|
|
| "shortcuts.dialog.toggle"
|
|
| "workspace.terminal.new"
|
|
| "worktree.new"
|
|
| "worktree.archive"
|
|
| "message-input.action";
|
|
|
|
export type KeyboardShortcutPayload =
|
|
| { index: number }
|
|
| { delta: 1 | -1 }
|
|
| { kind: MessageInputKeyboardActionKind }
|
|
| null;
|