global shortcut, but need something for onhold

This commit is contained in:
talksik
2022-04-24 08:08:44 -05:00
parent 54d979e1c9
commit 0b04528842
+6 -1
View File
@@ -1,4 +1,4 @@
import { BrowserWindow, app, dialog, ipcMain } from "electron";
import { BrowserWindow, app, dialog, globalShortcut, ipcMain } from "electron";
import Channels, { Dimensions } from "./electron/constants";
import { handleGoogleLogin } from "./electron/handleLogin";
@@ -68,6 +68,11 @@ app
browserWindow.setSize(width, height, false);
});
})
.then(() => {
globalShortcut.register("`", () => {
console.log("Electron loves global shortcuts!");
});
});
// Quit when all windows are closed, except on macOS. There, it's common