Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Partially fix #170: fix zoom with Ctrl + *numpad* +/-
Browse files Browse the repository at this point in the history
  • Loading branch information
ronjouch committed Mar 12, 2020
1 parent 079f842 commit cc03be2
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions app/src/components/menu.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Menu, shell, clipboard } from 'electron';
import { Menu, clipboard, globalShortcut, shell } from 'electron';

export function createMenu({
nativefierVersion,
Expand Down Expand Up @@ -115,17 +115,26 @@ export function createMenu({
},
{
label: 'Zoom In',
accelerator: 'CmdOrCtrl+=',
accelerator: (() => {
globalShortcut.register('CmdOrCtrl+numadd', zoomIn);
return 'CmdOrCtrl+=';
})(),
click: zoomIn,
},
{
label: 'Zoom Out',
accelerator: 'CmdOrCtrl+-',
accelerator: (() => {
globalShortcut.register('CmdOrCtrl+numsub', zoomOut);
return 'CmdOrCtrl+-';
})(),
click: zoomOut,
},
{
label: zoomResetLabel,
accelerator: 'CmdOrCtrl+0',
accelerator: (() => {
globalShortcut.register('CmdOrCtrl+num0', zoomReset);
return 'CmdOrCtrl+0';
})(),
click: zoomReset,
},
{
Expand Down

0 comments on commit cc03be2

Please sign in to comment.