mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-24 19:56:37 +00:00
Add a global shortcut to open DevTools
Fixes: https://github.com/resin-io/herostratus/issues/33
This commit is contained in:
parent
0c76a882e6
commit
b4c1ee8d3d
@ -19,7 +19,6 @@ install:
|
|||||||
- ps: Install-Product node $env:nodejs_version x64
|
- ps: Install-Product node $env:nodejs_version x64
|
||||||
- npm -g install npm@2
|
- npm -g install npm@2
|
||||||
- set PATH=%APPDATA%\npm;%PATH%
|
- set PATH=%APPDATA%\npm;%PATH%
|
||||||
- npm install -g electron-prebuilt
|
|
||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
build: off
|
build: off
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
var globalShortcut = require('global-shortcut');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var app = require('app');
|
var app = require('app');
|
||||||
var Menu = require('menu');
|
var Menu = require('menu');
|
||||||
@ -49,6 +50,10 @@ app.on('ready', function() {
|
|||||||
icon: path.join(__dirname, '..', 'assets', 'icon.png')
|
icon: path.join(__dirname, '..', 'assets', 'icon.png')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
globalShortcut.register('CmdOrCtrl+Alt+I', function() {
|
||||||
|
mainWindow.openDevTools();
|
||||||
|
});
|
||||||
|
|
||||||
mainWindow.showUrl(path.join(__dirname, 'index.html'));
|
mainWindow.showUrl(path.join(__dirname, 'index.html'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user