fix(desktop): stop ctrl+shift+r from reloading the app on windows and linux

This commit is contained in:
Dan Smolsky
2026-11-07 06:42:31 -05:00
Unverified
parent c72ce6cf82
commit bc89167784
+3 -2
View File
@@ -58,9 +58,10 @@ export const registerIpcHandlers = Effect.gen(function* () {
const wire = (win: BrowserWindow) => {
win.webContents.on("before-input-event", (_event, input) => {
// Ctrl+R renames the session in the renderer, so the default menu's Reload must not take it.
// Ctrl+R renames the session and Ctrl+Shift+R toggles review in the renderer,
// so the default menu's Reload and Force Reload must not take them.
win.webContents.setIgnoreMenuShortcuts(
input.control && !input.meta && !input.shift && !input.alt && input.key.toLowerCase() === "r",
input.control && !input.meta && !input.alt && input.key.toLowerCase() === "r",
)
if (input.type !== "keyDown" || input.key !== "Escape") return