From 5df49121ed061fa2f7f6f7825767c249b9deb668 Mon Sep 17 00:00:00 2001 From: kdxcxs Date: Thu, 8 Oct 2020 22:50:33 +0800 Subject: [PATCH] feat: support exit by press `x` --- src/main.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main.js b/src/main.js index 8d28b14..de7cb8e 100644 --- a/src/main.js +++ b/src/main.js @@ -21,15 +21,9 @@ function createWindow() { function init() { const win = createWindow() - globalShortcut.register('alt+x', () => { + globalShortcut.register('x', () => { app.exit(0) }) - // globalShortcut.register('ctrl+j', () => { - // win.webContents.executeJavaScript(`impress("impress").next()`) - // }) - // globalShortcut.register('ctrl+k', () => { - // win.webContents.executeJavaScript(`impress("impress").prev()`) - // }) } app.whenReady().then(init) \ No newline at end of file