diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index f5bc8390..dc780b9c 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -248,6 +248,13 @@ export class WindowManager { 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", () => { WindowManager.mainWindow?.webContents.closeDevTools(); this.editorWindows.delete(themeId);