reload app on ctrl-r or f5 from anywhere

pull/770/head
Audric Ackermann 5 years ago
parent 7ca3423529
commit e077b0a77b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -14,6 +14,7 @@ const packageJson = require('./package.json');
const GlobalErrors = require('./app/global_errors');
GlobalErrors.addHandler();
const { globalShortcut } = electron;
const getRealPath = pify(fs.realpath);
const {
@ -285,6 +286,13 @@ function createWindow() {
// Disable system main menu
mainWindow.setMenu(null);
globalShortcut.register('f5', () => {
mainWindow.reload()
})
globalShortcut.register('CommandOrControl+R', () => {
mainWindow.reload()
})
function captureAndSaveWindowStats() {
if (!mainWindow) {
return;

Loading…
Cancel
Save