From c8adba7f13ec86658d9de76e7816daee1a673dea Mon Sep 17 00:00:00 2001 From: Map1en_ Date: Fri, 7 May 2021 21:51:33 +0800 Subject: [PATCH] feat(shortcut): add show-hide keyboard shortcut (#650) --- src/electron/globalShortcut.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/electron/globalShortcut.js b/src/electron/globalShortcut.js index 23e17e2..d53a9c5 100644 --- a/src/electron/globalShortcut.js +++ b/src/electron/globalShortcut.js @@ -19,4 +19,7 @@ export function registerGlobalShortcut(win) { globalShortcut.register('Alt+CommandOrControl+L', () => { win.webContents.send('like'); }); + globalShortcut.register('Alt+CommandOrControl+M', () => { + win.isVisible() ? win.hide() : win.show(); + }); }