summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src
diff options
context:
space:
mode:
authorShoubhit Dash <[email protected]>2026-03-23 13:30:24 +0530
committerGitHub <[email protected]>2026-03-23 08:00:24 +0000
commit0f5626d2e46f9f8abfe616a33a4fd4f4d989e396 (patch)
tree4de359e69cd4606af00f5ca91b83510cabe6fbfe /packages/app/src
parent5ea95451dd485b15696877a9dd82c30a532b68e0 (diff)
downloadopencode-0f5626d2e46f9f8abfe616a33a4fd4f4d989e396.tar.gz
opencode-0f5626d2e46f9f8abfe616a33a4fd4f4d989e396.zip
fix(app): prefer cmd+k for command palette (#18731)
Diffstat (limited to 'packages/app/src')
-rw-r--r--packages/app/src/context/command-keybind.test.ts7
-rw-r--r--packages/app/src/pages/session/use-session-commands.tsx2
2 files changed, 8 insertions, 1 deletions
diff --git a/packages/app/src/context/command-keybind.test.ts b/packages/app/src/context/command-keybind.test.ts
index 4e38efd8d..d804195c4 100644
--- a/packages/app/src/context/command-keybind.test.ts
+++ b/packages/app/src/context/command-keybind.test.ts
@@ -40,4 +40,11 @@ describe("command keybind helpers", () => {
expect(display.includes("Alt") || display.includes("⌥")).toBe(true)
expect(formatKeybind("none")).toBe("")
})
+
+ test("formatKeybind prefers the first combo", () => {
+ const display = formatKeybind("mod+k,mod+p")
+
+ expect(display.includes("K") || display.includes("k")).toBe(true)
+ expect(display.includes("P") || display.includes("p")).toBe(false)
+ })
})
diff --git a/packages/app/src/pages/session/use-session-commands.tsx b/packages/app/src/pages/session/use-session-commands.tsx
index 1a2e777f5..f17e3f7a1 100644
--- a/packages/app/src/pages/session/use-session-commands.tsx
+++ b/packages/app/src/pages/session/use-session-commands.tsx
@@ -255,7 +255,7 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
id: "file.open",
title: language.t("command.file.open"),
description: language.t("palette.search.placeholder"),
- keybind: "mod+p",
+ keybind: "mod+k,mod+p",
slash: "open",
onSelect: () => dialog.show(() => <DialogSelectFile onOpenFile={showAllFiles} />),
}),