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.
This commit is contained in:
commit
a3a9149184
10 files changed
+1514
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* 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)"
|
||||
}
|
||||
]
|
||||
}];
|
||||
Reference in new issue
Block a user