Add keyboard shortcut to create a new workspace
Cmd+N (Ctrl+N off mac) navigates to the new-workspace route through a global handler keyed on the active host. The sidebar header row surfaces the shortcut hint on hover, replacing the redundant "+" button that duplicated the action in the Workspaces section header.
This commit is contained in:
@@ -120,6 +120,7 @@ const SHORTCUT_HELP_SECTION_LABEL_KEYS: Record<ShortcutSectionId, string> = {
|
||||
|
||||
const SHORTCUT_HELP_LABEL_KEYS: Record<string, string> = {
|
||||
"new-agent": "settings.shortcuts.help.openProject",
|
||||
"new-workspace": "settings.shortcuts.help.newWorkspace",
|
||||
"new-worktree": "settings.shortcuts.help.newWorktree",
|
||||
"archive-worktree": "settings.shortcuts.help.archiveWorktree",
|
||||
"workspace-tab-new": "settings.shortcuts.help.newTab",
|
||||
@@ -190,6 +191,32 @@ const SHORTCUT_BINDINGS: readonly ShortcutBinding[] = [
|
||||
},
|
||||
},
|
||||
|
||||
// --- New workspace ---
|
||||
{
|
||||
id: "workspace-new-cmd-n-mac",
|
||||
action: "workspace.new",
|
||||
combo: "Cmd+N",
|
||||
when: { mac: true, commandCenter: false },
|
||||
help: {
|
||||
id: "new-workspace",
|
||||
section: "projects",
|
||||
label: "New workspace",
|
||||
keys: ["mod", "N"],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "workspace-new-ctrl-n-non-mac",
|
||||
action: "workspace.new",
|
||||
combo: "Ctrl+N",
|
||||
when: { mac: false, commandCenter: false, terminal: false },
|
||||
help: {
|
||||
id: "new-workspace",
|
||||
section: "projects",
|
||||
label: "New workspace",
|
||||
keys: ["mod", "N"],
|
||||
},
|
||||
},
|
||||
|
||||
// --- New worktree ---
|
||||
{
|
||||
id: "worktree-new-cmd-o-mac",
|
||||
|
||||
Reference in New Issue
Block a user