mirror of
https://github.com/danbulant/arcade-machine
synced 2026-05-20 04:48:35 +00:00
Replaced complicated shortcut with globalshortcut
This commit is contained in:
parent
693b6ef5aa
commit
cc59ade8b6
1 changed files with 3 additions and 1 deletions
|
|
@ -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')
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue