feat: add Cmd+, keyboard shortcut to toggle settings (#319)
Add settings.toggle action with Cmd+, (Mac) / Ctrl+, (non-Mac) bindings. When on a settings route, pressing the shortcut navigates back; otherwise it pushes to the host settings route. Also adds comma to the shortcut key map so the combo string parses correctly.
This commit is contained in:
@@ -712,6 +712,32 @@ const SHORTCUT_BINDINGS: readonly ShortcutBinding[] = [
|
||||
},
|
||||
},
|
||||
|
||||
// --- Settings toggle ---
|
||||
{
|
||||
id: "settings-toggle-cmd-comma-mac",
|
||||
action: "settings.toggle",
|
||||
combo: "Cmd+,",
|
||||
when: { mac: true, commandCenter: false },
|
||||
help: {
|
||||
id: "toggle-settings",
|
||||
section: "panels",
|
||||
label: "Toggle settings",
|
||||
keys: ["mod", ","],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "settings-toggle-ctrl-comma-non-mac",
|
||||
action: "settings.toggle",
|
||||
combo: "Ctrl+,",
|
||||
when: { mac: false, commandCenter: false, terminal: false },
|
||||
help: {
|
||||
id: "toggle-settings",
|
||||
section: "panels",
|
||||
label: "Toggle settings",
|
||||
keys: ["mod", ","],
|
||||
},
|
||||
},
|
||||
|
||||
// --- Focus mode ---
|
||||
{
|
||||
id: "view-toggle-focus-cmd-shift-f-mac",
|
||||
|
||||
Reference in New Issue
Block a user