Description
The desktop menu shows File → New Window with a Ctrl+Shift+N keybind hint,
but pressing the shortcut does nothing. Clicking the menu item opens a new window
fine, so only the keyboard accelerator is dead.
Other shortcuts (settings Ctrl+,, zoom Ctrl+0/Ctrl++/Ctrl+-, and the edit
shortcuts) work correctly. Ctrl+Shift+N is the only broken one.
Root cause (from source)
The menu accelerators are defined in packages/app/src/desktop-menu.ts per
platform (macos: "Cmd+Shift+N", windows: "Ctrl+Shift+N"). macOS registers them
via a native Electron menu (packages/desktop/src/main/menu.ts), but that function
returns early on Windows (if (process.platform !== "darwin") return). Windows uses
an in-app dropdown (packages/app/src/components/windows-app-menu.tsx) where the
accelerator is only rendered as a label — nothing ever listens for the keystroke.
window.new is an action (not a command), so the renderer command keybind system
doesn't cover it either, and Electron's default menu (active on Windows) has no
"New Window" item. So Ctrl+Shift+N is never wired to createMainWindow().
Plugins
None
OpenCode version
1.18.16
Steps to reproduce
- Open the OpenCode desktop app on Windows.
- Press
Ctrl+Shift+N.
- Nothing happens. (File → New Window via the menu works.)
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Description
The desktop menu shows File → New Window with a
Ctrl+Shift+Nkeybind hint,but pressing the shortcut does nothing. Clicking the menu item opens a new window
fine, so only the keyboard accelerator is dead.
Other shortcuts (settings
Ctrl+,, zoomCtrl+0/Ctrl++/Ctrl+-, and the editshortcuts) work correctly.
Ctrl+Shift+Nis the only broken one.Root cause (from source)
The menu accelerators are defined in
packages/app/src/desktop-menu.tsperplatform (
macos: "Cmd+Shift+N",windows: "Ctrl+Shift+N"). macOS registers themvia a native Electron menu (
packages/desktop/src/main/menu.ts), but that functionreturns early on Windows (
if (process.platform !== "darwin") return). Windows usesan in-app dropdown (
packages/app/src/components/windows-app-menu.tsx) where theaccelerator is only rendered as a label — nothing ever listens for the keystroke.
window.newis anaction(not a command), so the renderer command keybind systemdoesn't cover it either, and Electron's default menu (active on Windows) has no
"New Window" item. So
Ctrl+Shift+Nis never wired tocreateMainWindow().Plugins
None
OpenCode version
1.18.16
Steps to reproduce
Ctrl+Shift+N.Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal