diff options
author | Vendicated <vendicated@riseup.net> | 2023-01-07 22:53:41 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-01-07 22:53:41 +0100 |
commit | 15aa2299c3220aa5964981b0958338b6fad1d5b9 (patch) | |
tree | 53ebf6be9b24561ca68c6d394b1530be15549fb8 | |
parent | 06aa72c636c45220e4b30721f725b151f7a6db18 (diff) | |
download | Vencord-15aa2299c3220aa5964981b0958338b6fad1d5b9.tar.gz Vencord-15aa2299c3220aa5964981b0958338b6fad1d5b9.tar.bz2 Vencord-15aa2299c3220aa5964981b0958338b6fad1d5b9.zip |
Add Ctrl+Q Exit shortcut on Windows
-rw-r--r-- | src/patcher.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/patcher.ts b/src/patcher.ts index 0cf7e24..6766e0f 100644 --- a/src/patcher.ts +++ b/src/patcher.ts @@ -17,7 +17,7 @@ */ import { onceDefined } from "@utils/onceDefined"; -import electron, { app, BrowserWindowConstructorOptions } from "electron"; +import electron, { app, BrowserWindowConstructorOptions, globalShortcut } from "electron"; import { readFileSync } from "fs"; import { dirname, join } from "path"; @@ -153,6 +153,13 @@ if (!process.argv.includes("--vanilla")) { responseHeaders["content-type"] = ["text/css"]; } cb({ cancel: false, responseHeaders }); + + + if (process.platform === "win32") { + globalShortcut.register("Control+Q", () => { + app.quit(); + }); + } }); }); } else { |