Skip to content

Feat(desktop): Cmd+Q closes the window without quitting the app - #704

Open
junereycasuga wants to merge 1 commit into
ZenNotes:mainfrom
junereycasuga:feat/cmd-q-close-window
Open

Feat(desktop): Cmd+Q closes the window without quitting the app#704
junereycasuga wants to merge 1 commit into
ZenNotes:mainfrom
junereycasuga:feat/cmd-q-close-window

Conversation

@junereycasuga

@junereycasuga junereycasuga commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Closes #701

Summary

On macOS, pressing Cmd+Q previously fully quit ZenNotes. This PR changes it so Cmd+Q closes the active/main workspace window while leaving the app process running in the background. A new "Completely Quit ZenNotes" menu item is added for users who want to fully exit.

This also keeps Quick Capture usable even when the main note window is closed.

What changed

  • Replaced the macOS app menu's role: "quit" item with a custom "Close Window" item bound to CmdOrCtrl+Q.
    • Clicking it or pressing Cmd+Q closes BrowserWindow.getFocusedWindow() (falling back to mainWindow).
    • On macOS, window-all-closed already keeps the process alive, so the app stays in the background.
  • Added "Completely Quit ZenNotes" to the ZenNotes menu, which calls app.quit().

Why

  • Faster reopening via Dock / zn open without a cold start.
  • Quick Capture's global hotkey remains registered while the process is alive, so it works even with no visible window.

Notes

This only affects the macOS menu bar because Windows/Linux currently hide the application menu (autoHideMenuBar: true). The change is scoped to apps/desktop/src/main/index.ts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: CmdOrCtrl+Q should close the window without quitting the app

1 participant