aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-01-07 22:53:41 +0100
committerVendicated <vendicated@riseup.net>2023-01-07 22:53:41 +0100
commit15aa2299c3220aa5964981b0958338b6fad1d5b9 (patch)
tree53ebf6be9b24561ca68c6d394b1530be15549fb8 /src
parent06aa72c636c45220e4b30721f725b151f7a6db18 (diff)
downloadVencord-15aa2299c3220aa5964981b0958338b6fad1d5b9.tar.gz
Vencord-15aa2299c3220aa5964981b0958338b6fad1d5b9.tar.bz2
Vencord-15aa2299c3220aa5964981b0958338b6fad1d5b9.zip
Add Ctrl+Q Exit shortcut on Windows
Diffstat (limited to 'src')
-rw-r--r--src/patcher.ts9
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 {