Replaced complicated shortcut with globalshortcut

This commit is contained in:
Vaclav Siml 2023-02-24 23:59:25 +01:00
parent 693b6ef5aa
commit cc59ade8b6

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow } = require('electron');
const { globalShortcut } = require('electron');
const createWindow = () => {
// Create the browser window.
mainWindow = new BrowserWindow({
@ -18,4 +18,6 @@ const createWindow = () => {
app.whenReady().then(() => {
createWindow();
const ret = globalShortcut.register(ExitKey1 + " + " + ExitKey2, () => { //makes globalshortcut from vars in vars.js
console.log('CommandOrControl+X is pressed')
});