-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
38 lines (28 loc) · 789 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';
const {
app,
BrowserWindow,
ipcMain,
} = require('electron');
let mainWindow;
app.on('ready', function() {
mainWindow = new BrowserWindow({
height: 650,
width: 1000
});
mainWindow.webContents.openDevTools();
mainWindow.loadURL('file://' + __dirname + '/app/index.html');
// Cleanup when window is closed
mainWindow.on('closed', function() {
mainWindow = null;
});
// electronLocalshortcut.register(mainWindow, 'Delete', () => {
// console.log('Delete is pressed');
// });
// Check whether a shortcut is registered.
//console.log(electronLocalshortcut.isRegistered('Delete'));
});
// Quit when all windows are closed
app.on('window-all-closed', function() {
app.quit();
});