From 3360480a2a0fa2a76454e0d8c9deae926dad2876 Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:31:35 +1000 Subject: [PATCH] fix: bind F12 and Ctrl+Shift+I to DevTools on all platforms --- packages/desktop-electron/src/main/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/desktop-electron/src/main/index.ts b/packages/desktop-electron/src/main/index.ts index f84414a5dc..4317b731c8 100644 --- a/packages/desktop-electron/src/main/index.ts +++ b/packages/desktop-electron/src/main/index.ts @@ -294,6 +294,18 @@ function wireWindowDiagnostics(win: BrowserWindow, label: string) { }) }) + // DevTools accelerators on Windows/Linux where the menu isn't created. + win.webContents.on("before-input-event", (_event, input) => { + if (input.type !== "keyDown") return + const key = input.key + const toggle = + key === "F12" || + (input.control && input.shift && (key === "I" || key === "i")) || + (input.meta && input.alt && (key === "I" || key === "i")) + if (!toggle) return + win.webContents.toggleDevTools() + }) + win.on("unresponsive", () => { logger.error(`${label} window became unresponsive`) })