Allow closing the about window by pressing Escape

This commit is contained in:
Amelia Frost 2026-04-05 23:15:07 -07:00
parent a632ecde33
commit 35ee57483a
No known key found for this signature in database

View file

@ -48,4 +48,12 @@ export function createAboutWindow() {
aboutWindow.on("closed", () => { aboutWindow.on("closed", () => {
aboutWindow = null; aboutWindow = null;
}); });
// Close window on Escape
aboutWindow.webContents.on("before-input-event", (event, input) => {
if (input.key.toLowerCase() === "escape") {
event.preventDefault();
aboutWindow.close();
}
});
} }