mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-09 03:37:45 +03:00
feat: add F12 shortcut to toggle dev tools
This commit is contained in:
parent
964e9bbb2b
commit
6a6e3ca7da
@ -248,6 +248,13 @@ export class WindowManager {
|
|||||||
|
|
||||||
WindowManager.mainWindow?.webContents.openDevTools();
|
WindowManager.mainWindow?.webContents.openDevTools();
|
||||||
|
|
||||||
|
editorWindow.webContents.on("before-input-event", (event, input) => {
|
||||||
|
if (input.key === "F12") {
|
||||||
|
event.preventDefault();
|
||||||
|
this.mainWindow?.webContents.toggleDevTools();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
editorWindow.on("close", () => {
|
editorWindow.on("close", () => {
|
||||||
WindowManager.mainWindow?.webContents.closeDevTools();
|
WindowManager.mainWindow?.webContents.closeDevTools();
|
||||||
this.editorWindows.delete(themeId);
|
this.editorWindows.delete(themeId);
|
||||||
|
Loading…
Reference in New Issue
Block a user