Open a project with Cmd+O (#1849)
* feat(app): open a project with Cmd+O Cmd+O now opens the project picker (was Cmd+Shift+O). New worktree, which previously used Cmd+O, no longer has a keyboard shortcut; its sidebar button still creates one. * test(app): assert old Cmd+Shift+O open-project binding is unbound Locks in the rebind to Cmd+O so re-adding a Cmd+Shift+O binding would fail CI. * fix(app): keep Open project override id stable and forward Cmd+O in desktop browser - Binding ids for Open project keep their original names so existing user shortcut overrides (keyed by binding id) survive the Cmd+Shift+O -> Cmd+O rebind. - Forward "o" from focused browser webviews in the desktop app so Cmd/Ctrl+O reaches the renderer and opens the project picker there too.
This commit is contained in:
@@ -124,8 +124,8 @@ interface HelpSectionCase {
|
||||
describe("keyboard-shortcuts", () => {
|
||||
const matchingCases: MatchingShortcutCase[] = [
|
||||
{
|
||||
name: "matches Mod+Shift+O to create new agent",
|
||||
event: { key: "O", code: "KeyO", metaKey: true, shiftKey: true },
|
||||
name: "matches Cmd+O to open project",
|
||||
event: { key: "o", code: "KeyO", metaKey: true },
|
||||
context: { isMac: true },
|
||||
action: "agent.new",
|
||||
},
|
||||
@@ -227,8 +227,8 @@ describe("keyboard-shortcuts", () => {
|
||||
action: "workspace.tab.close.current",
|
||||
},
|
||||
{
|
||||
name: "matches Ctrl+Shift+O to create new agent on non-mac",
|
||||
event: { key: "O", code: "KeyO", ctrlKey: true, shiftKey: true },
|
||||
name: "matches Ctrl+O to open project on non-mac",
|
||||
event: { key: "o", code: "KeyO", ctrlKey: true },
|
||||
context: { isMac: false },
|
||||
action: "agent.new",
|
||||
},
|
||||
@@ -394,6 +394,16 @@ describe("keyboard-shortcuts", () => {
|
||||
name: "does not keep old Alt+Shift+T binding",
|
||||
event: { key: "T", code: "KeyT", altKey: true, shiftKey: true },
|
||||
},
|
||||
{
|
||||
name: "does not keep old Cmd+Shift+O open-project binding after rebind to Cmd+O",
|
||||
event: { key: "O", code: "KeyO", metaKey: true, shiftKey: true },
|
||||
context: { isMac: true },
|
||||
},
|
||||
{
|
||||
name: "does not keep old Ctrl+Shift+O open-project binding after rebind to Ctrl+O",
|
||||
event: { key: "O", code: "KeyO", ctrlKey: true, shiftKey: true },
|
||||
context: { isMac: false },
|
||||
},
|
||||
{
|
||||
name: "does not match question-mark shortcut inside editable scopes",
|
||||
event: { key: "?", code: "Slash", shiftKey: true },
|
||||
@@ -580,7 +590,7 @@ describe("keyboard-shortcut help sections", () => {
|
||||
name: "uses web defaults for workspace and tab jump",
|
||||
context: { isMac: true, isDesktop: false },
|
||||
expectedKeys: {
|
||||
"new-agent": ["mod", "shift", "O"],
|
||||
"new-agent": ["mod", "O"],
|
||||
"workspace-tab-new": ["mod", "T"],
|
||||
"workspace-jump-index": ["alt", "1-9"],
|
||||
"workspace-tab-jump-index": ["alt", "shift", "1-9"],
|
||||
@@ -594,7 +604,7 @@ describe("keyboard-shortcut help sections", () => {
|
||||
name: "uses desktop defaults for workspace and tab jump",
|
||||
context: { isMac: true, isDesktop: true },
|
||||
expectedKeys: {
|
||||
"new-agent": ["mod", "shift", "O"],
|
||||
"new-agent": ["mod", "O"],
|
||||
"new-workspace": ["mod", "N"],
|
||||
"workspace-tab-new": ["mod", "T"],
|
||||
"workspace-jump-index": ["mod", "1-9"],
|
||||
|
||||
Reference in New Issue
Block a user