mirror of
https://github.com/danbulant/arcade-machine
synced 2026-06-14 03:51:11 +00:00
23 lines
714 B
JavaScript
23 lines
714 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
const { globalShortcut } = require('electron');
|
|
const createWindow = () => {
|
|
// Create the browser window.
|
|
mainWindow = new BrowserWindow({
|
|
width: 800,
|
|
height: 600,
|
|
webPreferences: {
|
|
nodeIntegration: true,
|
|
contextIsolation: false,
|
|
enableRemoteModule: true
|
|
},
|
|
autoHideMenuBar: true
|
|
});
|
|
mainWindow.loadFile("index.html") //loadne index.html
|
|
};
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow();
|
|
const ret = globalShortcut.register(ExitKey1 + " + " + ExitKey2, () => { //makes globalshortcut from vars in vars.js
|
|
console.log('CommandOrControl+X is pressed')
|
|
});
|