Skip to content

Commit 6e7333e

Browse files
committed
shortcut: Add F5 shortcut for reloading the app.
1 parent 0d8dd1c commit 6e7333e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/renderer/js/preload.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,10 @@ window.addEventListener('beforeunload', () => {
6363
SetupSpellChecker.unsubscribeSpellChecker();
6464
});
6565

66+
// electron's globalShortcut can cause unexpected results
67+
// so adding the reload shortcut in the old-school way
68+
document.addEventListener('keydown', event => {
69+
if (event.code === 'F5') {
70+
ipcRenderer.send('forward-message', 'hard-reload');
71+
}
72+
});

0 commit comments

Comments
 (0)