on macOS, open/close Settings with Cmd+,

This commit is contained in:
Amelia Frost 2026-04-04 20:54:16 -07:00
parent 741102d6eb
commit da383611c0
No known key found for this signature in database

View file

@ -157,6 +157,18 @@ export function createMainWindow() {
} else { } else {
mainWindow.webContents.openDevTools({ mode: "detach" }); mainWindow.webContents.openDevTools({ mode: "detach" });
} }
} else if (
input.meta &&
input.key === "," &&
process.platform === "darwin"
) {
mainWindow.webContents.executeJavaScript(`(() => {
var escButton = document.querySelector("#floating .top_0 > button");
var settingsPanel = document.querySelector("#root div[aria-label='Settings'] > a");
if (escButton) escButton.click();
if (!escButton && settingsPanel) settingsPanel.click();
})();`);
} }
}); });