mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: add F12 shortcut to toggle dev tools
This commit is contained in:
parent
964e9bbb2b
commit
6a6e3ca7da
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue