Skip to content

[FEATURE]:add config option to disable Electron native menu accelerators (Ctrl+M/Ctrl+W) #34937

Closed as not planned

Description

@493Arceus

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

On Windows, the OpenCode Desktop app uses Electron's built-in { role: "windowMenu" } menu, which registers Ctrl+M as the "Minimize" accelerator and Ctrl+W as "Close". This cannot be disabled through opencode.json or tui.json because it's handled at the Electron/native menu level, not the TUI keybind system.

For users who want to use Ctrl+M or Ctrl+W for other purposes (or who find Ctrl+M accidentally minimizes the window), there is currently no way to disable these native accelerators.

Describe the solution you'd like

Add a config option, either in opencode.json or tui.json, to disable or customize the Electron native menu accelerators. Some possibilities:

A disable_native_accelerators flag:

{
  "desktop": {
    "disable_native_accelerators": ["Ctrl+M", "Ctrl+W"]
  }
}

Or simply an option to replace { role: "windowMenu" } with a custom Window menu that omits the minimize accelerator.
Describe alternatives you've considered

Using AutoHotkey to intercept Ctrl+M — works but requires third-party software
Manually patching the Electron app — gets wiped on every update
Neither is a proper solution for end users.

Additional context

This is related to the Electron windowMenu role which on Windows defaults to Minimize (Ctrl+M) and Close (Ctrl+W). On macOS the same role uses Cmd+M/Cmd+W which are more standard and less likely to conflict.

Activity

  1. github-actions commented on Jul 2, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. github-actions commented on Sep 1, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions