Skip to content

feat(electron): add Cmd/Ctrl +/-/0 zoom shortcuts for the renderer#646

Merged
arkml merged 1 commit into
rowboatlabs:devfrom
hrsvrn:feat/zoom-shortcuts
Jun 26, 2026
Merged

feat(electron): add Cmd/Ctrl +/-/0 zoom shortcuts for the renderer#646
arkml merged 1 commit into
rowboatlabs:devfrom
hrsvrn:feat/zoom-shortcuts

Conversation

@hrsvrn

@hrsvrn hrsvrn commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

The app sets no application menu, so it relied on Electron's default menu for the zoom accelerators — and on Linux that menu bar is suppressed by the frameless hiddenInset title bar, leaving the shortcuts unhandled. Wire them directly via before-input-event: Cmd/Ctrl + (+/=) zooms in, (-/_) zooms out, and 0 resets, clamped to zoom levels -3..3. event.preventDefault() stops the keystroke from leaking into the editor.

The app sets no application menu, so it relied on Electron's default menu
for the zoom accelerators — and on Linux that menu bar is suppressed by the
frameless `hiddenInset` title bar, leaving the shortcuts unhandled. Wire
them directly via `before-input-event`: Cmd/Ctrl + (+/=) zooms in,
(-/_) zooms out, and 0 resets, clamped to zoom levels -3..3.
`event.preventDefault()` stops the keystroke from leaking into the editor.
@arkml arkml merged commit 40d6846 into rowboatlabs:dev Jun 26, 2026
2 checks passed
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.

2 participants