summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2026-01-16 23:49:34 +0000
committerDavid Hill <[email protected]>2026-01-17 00:55:13 +0000
commit69215d456c545a6923c13cc183fcc8a027be72d7 (patch)
treedd425c504ca12ef7ef73ddbedc95b1fde972f22f /packages/app/src/context
parent54e52896a4eeb40f1e61d80c20c3b01c7dd8ad86 (diff)
downloadopencode-69215d456c545a6923c13cc183fcc8a027be72d7.tar.gz
opencode-69215d456c545a6923c13cc183fcc8a027be72d7.zip
fix: display arrow keys as symbols in keybind formatting
Diffstat (limited to 'packages/app/src/context')
-rw-r--r--packages/app/src/context/command.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/app/src/context/command.tsx b/packages/app/src/context/command.tsx
index 3c640d8e9..a93ffc024 100644
--- a/packages/app/src/context/command.tsx
+++ b/packages/app/src/context/command.tsx
@@ -104,7 +104,15 @@ export function formatKeybind(config: string): string {
if (kb.meta) parts.push(IS_MAC ? "⌘" : "Meta")
if (kb.key) {
- const displayKey = kb.key.length === 1 ? kb.key.toUpperCase() : kb.key.charAt(0).toUpperCase() + kb.key.slice(1)
+ const arrows: Record<string, string> = {
+ arrowup: "↑",
+ arrowdown: "↓",
+ arrowleft: "←",
+ arrowright: "→",
+ }
+ const displayKey =
+ arrows[kb.key.toLowerCase()] ??
+ (kb.key.length === 1 ? kb.key.toUpperCase() : kb.key.charAt(0).toUpperCase() + kb.key.slice(1))
parts.push(displayKey)
}