mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-15 16:33:02 -03:00
feat: add F12 shortcut to toggle dev tools
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user