Repository navigation
Description
What happened
Desktop shortcut display strings are hard-coded to macOS glyphs on all platforms. The behavior is correct (Ctrl+N works on Windows), but the labels still show ⌘.
-
Sidebar "New Task" button (
packages/ui/src/session-sidebar-nav.tsx:69) always renders<kbd>⌘ N</kbd>:endContent={<kbd className="maka-nav-kbd" aria-hidden="true">⌘ N</kbd>}
On Windows it should be
Ctrl N. -
Keyboard Help panel (
apps/desktop/src/renderer/locales/shell-copy.ts:1119-1126zh /1644-1658en) hard-codes:{ keys: ['⌘', 'K'], description: 'Open command palette' }, { keys: ['⌘', 'N'], description: 'Create a new task' }, { keys: ['⌘', ','], description: 'Open Settings' }, { keys: ['⌘', 'Shift', 'D'], description: 'Copy diagnostics' },
keyboard-help.tsxonly renderscopy.sections;ASTRYX_KEY_TOKENS['⌘']='mod'affects hotkey binding, not display. -
Static command hints in the same file also hard-code macOS:
action:open-settings: hint: '⌘,'→ WindowsCtrl+,action:side-chat: hint: '⌥⌘S'→ WindowsCtrl+Alt+Sdiag:copy-diagnostics: hint: '⇧⌘D · …'→ WindowsCtrl+Shift+D
For comparison, the actual shortcut handling is already cross-platform:
// apps/desktop/src/renderer/app-shell-effects.ts:269
useHotkeys([
{ keys: 'mod+,', allowInInputs: true, onPress: () => openSettings() },
{ keys: 'mod+n', allowInInputs: true, onPress: (e) => { if (!e.shiftKey) createSession() } },
])mod resolves to Cmd on macOS and Ctrl on Windows/Linux, so Ctrl+N correctly creates a new task on Windows — only the UI text is wrong.
Similarly, the native menu is correct:
// apps/desktop/src/main/application-menu.ts:54-102
if (platform !== 'darwin') return null; // renderer owns shortcuts on Win/Linux
{ label: 'New Task', accelerator: 'CmdOrCtrl+N' } // only on darwinExpected:
- Windows/Linux:
Ctrl+N(New Task),Ctrl+K(Command palette),Ctrl+,(Settings),Ctrl+Shift+D(Diagnostics) in both the sidebar kbd and Keyboard Help. - macOS: keep
⌘ N/⌘ K/⌘ ,/⇧⌘D. - Also map
⇧→Shift,⌥→Alton Windows.
Suggested fix:
Reuse existing platform signal window.maka.app.info().platform (darwin/win32/linux, already written to document.documentElement[data-os] in app-shell-effects.ts:102) to branch display strings, e.g. a formatShortcut(['mod','n']) helper or platform-aware getShellCopy(platform) / SessionSidebarNav prop. Avoid hard-coding ⌘/⌥/⇧ in shell-copy.ts — derive them from platform === 'darwin'.
How to reproduce
- Launch Desktop on Windows (
info.platform === 'win32'), or inspect the renderer with any platform mock. - Observe the left Session sidebar: the "New Task" row shows
⌘ Non the right (expectedCtrl Non Windows). - Press
?to open the Keyboard Shortcuts panel → "General" section shows⌘ N/⌘ K/⌘ ,/⌘ Shift D(Windows should showCtrlprefix). - Press
Ctrl+N— a new task is correctly created (behavior is fine, only display is wrong).
Environment
- Maka version or commit:
2b4c0deaa(main, 2026-08-26) - OS and version: Reproduces on Windows (
platform: win32); macOS displays correctly and serves as the reference - Surface: Desktop (Electron + Renderer,
packages/ui+apps/desktop/src/renderer) - Node.js version: N/A (desktop build)
Logs, screenshots, or additional context
No runtime error; functional shortcut mod+n works, data-os attribute is already set correctly. Additional file refs:
packages/ui/src/session-sidebar-nav.tsx:69— hard-coded<kbd>⌘ N</kbd>apps/desktop/src/renderer/locales/shell-copy.ts— all⌘/⌥/⇧hintsapps/desktop/src/renderer/keyboard-help.tsx:40-41—ASTRYX_KEY_TOKENSmaps⌘→modfor binding onlyapps/desktop/src/renderer/app-shell-effects.ts:102—data-ossourceapps/desktop/src/main/application-menu.ts:54-102— correct platform-branching reference implementation
中文详情 / Chinese details
Desktop 上的「新建任务」旁快捷键提示以及键盘帮助面板(? / ⌘/)在所有平台都固定显示为 macOS 样式 ⌘ N / ⌘ K / ⌘ , / ⇧⌘D 等,而在 Windows 上按平台约定应显示为 Ctrl N / Ctrl K / Ctrl , / Ctrl+Shift+D。
功能层是正确的:app-shell-effects.ts:269 已使用 mod 跨平台抽象,mod 在 macOS 解析为 Cmd、Win/Linux 解析为 Ctrl,所以 Ctrl+N 确实能新建任务,问题只在展示层写死了 ⌘。
展示层写死位置:
packages/ui/src/session-sidebar-nav.tsx:69侧边栏「新建任务」按钮右侧⌘ Nshell-copy.ts:1119-1126/1644-1658keyboardHelp的⌘ K/⌘ N/⌘ ,/⌘ Shift D- 同文件
hint: '⌘,'/'⌥⌘S'/'⇧⌘D'
预期:Win/Linux 显示 Ctrl 前缀,macOS 保持 ⌘。复用 window.maka.app.info().platform → data-os 做平台分支,避免在 shell-copy.ts 硬编码字形,⇧/⌥ 同步映射为 Shift/Alt。
复现步骤:在 Win 上启动 → 观察侧边栏 ⌘ N → 打开 ? 快捷键面板查看 ⌘ 前缀 → 按 Ctrl+N 功能正常仅显示错误。
Activity
[-]fix(desktop): Windows 仍显示 ⌘ N 等 macOS 快捷键字形(新建任务/键盘帮助/命令面板 hint)[/-][+]fix(desktop): keyboard shortcuts show macOS glyphs (⌘ N) on Windows instead of Ctrl[/+]fix(desktop): spell keyboard shortcut labels per platform
test(desktop): cover shortcut labels on darwin, win32 and linux
fix(desktop): spell keyboard shortcut labels per platform
test(desktop): cover shortcut labels on darwin, win32 and linux
fix(desktop): spell keyboard shortcut labels per platform
test(desktop): cover shortcut labels on darwin, win32 and linux
ggbdpq commentedon Sep 1, 2026
take
fix(desktop): show platform-correct shortcut labels on Windows and Linux
fix(desktop): show platform-correct shortcut labels on Windows and Li…