From 657b51b0da80becdcf17ba2a01fe71d1178fd1cf Mon Sep 17 00:00:00 2001 From: Tuxinal <24763016+tuxinal@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:35:00 +0330 Subject: [PATCH] fix shortcut string function --- src/renderer/patches/keybinds.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/patches/keybinds.ts b/src/renderer/patches/keybinds.ts index e352043..fc33f73 100644 --- a/src/renderer/patches/keybinds.ts +++ b/src/renderer/patches/keybinds.ts @@ -4,11 +4,11 @@ * Copyright (c) 2023 Vendicated and Vencord contributors */ -import { findByPropsLazy } from "@vencord/types/webpack"; +import { findByCodeLazy } from "@vencord/types/webpack"; import { keybindCallbacks } from "renderer"; import { addPatch } from "./shared"; -const { toString } = findByPropsLazy("keyToCode"); +const toShortcutString = findByCodeLazy('return"gamepad".'); addPatch({ patches: [ @@ -52,7 +52,7 @@ addPatch({ registerKeybind: function (id, shortcut, callback, options) { keybindCallbacks[id] = callback; - VesktopNative.keybind.register(id, toString(shortcut), options); + VesktopNative.keybind.register(id, toShortcutString(shortcut), options); }, unregisterKeybind: function (id) { delete keybindCallbacks[id];