diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index bf915b0..387b056 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -37,7 +37,8 @@ export default function SettingsUi() { "Open Links in app (experimental)", "Opens links in a new Vencord Desktop window instead of your web browser" ], - ["staticTitle", "Static Title", 'Makes the window title "Vencord" instead of changing to the current page'] + ["staticTitle", "Static Title", 'Makes the window title "Vencord" instead of changing to the current page'], + ["disableAltMenu", "Disable Alt Menu", "Prevent pressing Alt from showing the menu bar", true] ]; return ( diff --git a/src/renderer/fixes.ts b/src/renderer/fixes.ts index 805aac5..33f8ec2 100644 --- a/src/renderer/fixes.ts +++ b/src/renderer/fixes.ts @@ -10,6 +10,8 @@ import { waitFor } from "@vencord/types/webpack"; import { isFirstRun, localStorage } from "./utils"; +import { Settings } from "./settings"; + // Make clicking Notifications focus the window const originalSetOnClick = Object.getOwnPropertyDescriptor(Notification.prototype, "onclick")!.set!; Object.defineProperty(Notification.prototype, "onclick", { @@ -31,3 +33,12 @@ if (isFirstRun) { m.setDesktopType("all"); }); } + +// Prevent pressing Alt from opening the menu bar +document.addEventListener("keyup", e => { + console.log(e); + if (e.key !== "Alt") return; + if (!Settings.store.disableAltMenu) return; + e.preventDefault(); +}); + diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index f2b6ced..c5ff2a0 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -18,6 +18,7 @@ export interface Settings { minimizeToTray?: boolean; skippedUpdate?: string; staticTitle?: boolean; + disableAltMenu?: boolean; arRPC?: boolean; appBadge?: boolean;