mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
87920505db
a.k.a. "Install Prettier"
18 lines
737 B
TypeScript
18 lines
737 B
TypeScript
import {app} from "electron";
|
|
import {mainWindow} from "./window";
|
|
//https://github.com/electron/electron/issues/1334#issuecomment-716080005
|
|
// TO-DO add more
|
|
app.on("web-contents-created", (webContentsCreatedEvent, webContents) => {
|
|
webContents.on("before-input-event", (beforeInputEvent, input) => {
|
|
// console.log('Main console::', input)
|
|
const {code, alt, control, shift, meta} = input;
|
|
// Shortcut: toggle devTools
|
|
if (shift && control && !alt && !meta && code === "KeyI") {
|
|
mainWindow.webContents.toggleDevTools();
|
|
}
|
|
// Shortcut: window reload
|
|
if (shift && control && !alt && !meta && code === "KeyR") {
|
|
mainWindow.reload();
|
|
}
|
|
});
|
|
});
|