Files
Evandro Fonseca Junior a3a9149184 WaylandKeybinds: reliable Discord global keybinds on GNOME Wayland
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.
2026-11-02 00:51:25 -03:00

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)"
}
]
}];