Vencord plugin for the Discord desktop app. Toggles fire on key press, push-to-talk infers releases GNOME drops (re-registration probe), and GNOME's trigger descriptions are matched correctly. Includes basis-path tests, a patch checker against the live Discord bundle, the design spec and the README assets.
27 lines
859 B
TypeScript
27 lines
859 B
TypeScript
/*
|
|
* Vencord, a Discord client mod
|
|
* Copyright (c) 2026 Evandro
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
import type { Patch } from "@utils/types";
|
|
|
|
export const PATCHES: Omit<Patch, "plugin">[] = [{
|
|
// KeybindsStore: native keybind registration and Wayland portal state
|
|
find: "Skipping registration.",
|
|
replacement: [
|
|
{
|
|
match: /(\i\.\i)\.inputEventRegister\((\i),(\i),(\i),(\i)\)/,
|
|
replace: "$1.inputEventRegister($2,$3,...$self.wrapRegistration($1,$2,$3,$4,$5))"
|
|
},
|
|
{
|
|
match: /(\i\.\i)\.inputEventUnregister\(/,
|
|
replace: "$self.unregister($1,"
|
|
},
|
|
{
|
|
match: /(setWaylandPortalShortcutsCallback\(\i=>\{let \i=\{\};for\(let (\i) of \i\)\i\[String\(\2\.eventId\)\]=)\2/,
|
|
replace: "$1$self.fixPortalState($2)"
|
|
}
|
|
]
|
|
}];
|