Allow closing the about window by pressing Escape
This commit is contained in:
parent
a632ecde33
commit
35ee57483a
1 changed files with 8 additions and 0 deletions
|
|
@ -48,4 +48,12 @@ export function createAboutWindow() {
|
|||
aboutWindow.on("closed", () => {
|
||||
aboutWindow = null;
|
||||
});
|
||||
|
||||
// Close window on Escape
|
||||
aboutWindow.webContents.on("before-input-event", (event, input) => {
|
||||
if (input.key.toLowerCase() === "escape") {
|
||||
event.preventDefault();
|
||||
aboutWindow.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue