Skip to content

Commit

Permalink
preload: Update reason for using dom listeners.
Browse files Browse the repository at this point in the history
Even though Electron v5 supports numpad keys, we can't add another
accelerator to the same menu item.
  • Loading branch information
kanishk98 committed Jul 4, 2019
1 parent 1fe62e5 commit 315ea4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/renderer/js/preload.js
Expand Up @@ -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');
Expand Down

0 comments on commit 315ea4a

Please sign in to comment.