2018-11-26 12:08:52 -08:00
|
|
|
// @flow
|
|
|
|
|
2018-11-26 12:19:12 -08:00
|
|
|
/* eslint-disable import/no-extraneous-dependencies */
|
2019-01-28 16:34:07 -08:00
|
|
|
import { globalShortcut, typeof BrowserWindow, typeof app as ElectronApp } from 'electron';
|
2018-11-26 12:08:52 -08:00
|
|
|
|
2019-01-29 07:03:04 -08:00
|
|
|
export const registerDebugShortcut = (app: ElectronApp, mainWindow: BrowserWindow) => globalShortcut.register('CommandOrControl+Option+B', () => {
|
|
|
|
// $FlowFixMe
|
|
|
|
app.dock.show();
|
|
|
|
mainWindow.webContents.openDevTools();
|
|
|
|
});
|