mirror of
https://github.com/danbulant/arcade-machine
synced 2026-05-24 12:35:38 +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 { app, BrowserWindow } = require('electron');
|
||||||
|
const { globalShortcut } = require('electron');
|
||||||
const createWindow = () => {
|
const createWindow = () => {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
|
|
@ -18,4 +18,6 @@ const createWindow = () => {
|
||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
createWindow();
|
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