From 315ea4aef212aec4b7c2131f2b794b6a44637a37 Mon Sep 17 00:00:00 2001 From: Kanishk Kakar Date: Thu, 4 Jul 2019 17:46:48 +0530 Subject: [PATCH] preload: Update reason for using dom listeners. Even though Electron v5 supports numpad keys, we can't add another accelerator to the same menu item. --- app/renderer/js/preload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/renderer/js/preload.js b/app/renderer/js/preload.js index 381c7ca97..eeecfa70c 100644 --- a/app/renderer/js/preload.js +++ b/app/renderer/js/preload.js @@ -88,7 +88,8 @@ window.addEventListener('beforeunload', () => { // electron's globalShortcut can cause unexpected results // so adding the reload shortcut in the old-school way -// Zoom from numpad keys is not supported by electron, so adding it through listeners. +// electron does not support adding multiple accelerators for a menu item +// so adding numpad shortcuts here document.addEventListener('keydown', event => { if (event.code === 'F5') { ipcRenderer.send('forward-message', 'hard-reload');