Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Commit 9ff5ba2

Browse files
committed
back and forward with alt+left and alt+right
1 parent 3cd2b56 commit 9ff5ba2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

public/electron.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ function createWindow () {
4646

4747
electron.globalShortcut.register('f5', () => mainWindow.reload())
4848
electron.globalShortcut.register('CommandOrControl+R', () => mainWindow.reload())
49+
electron.globalShortcut.register('Alt+Left', () => {
50+
if (mainWindow.webContents.canGoBack()) mainWindow.webContents.goBack()
51+
})
52+
electron.globalShortcut.register('Alt+Right', () => {
53+
if (mainWindow.webContents.canGoForward()) mainWindow.webContents.goForward()
54+
})
55+
4956

5057
console.log('ready')
5158
mainWindow.loadURL('https://127.0.0.1:6363/')

0 commit comments

Comments
 (0)