shortcut: Add F5 shortcut for reloading the app.

This commit is contained in:
Akash Nimare
2018-04-07 19:52:46 +05:30
parent 0d8dd1cd90
commit 6e7333eab6

View File

@@ -63,3 +63,10 @@ window.addEventListener('beforeunload', () => {
SetupSpellChecker.unsubscribeSpellChecker();
});
// electron's globalShortcut can cause unexpected results
// so adding the reload shortcut in the old-school way
document.addEventListener('keydown', event => {
if (event.code === 'F5') {
ipcRenderer.send('forward-message', 'hard-reload');
}
});