Earlier quoted context omitted.
On Linux, I just tested that if you have a Mozilla Firefox window running on X (I tested on XWayland but it should work just as well on X11) with the Discord tab in view, you can use your desktop's/compositor global keyboard shortcut functionality to call xdotool to send a keyup/keydown event without focusing the window , like this: xdotool search --name 'Discord.*— Mozilla Firefox' keydown F9 xdotool search --name '…
> this doesn't work if you're using Discord on Chromium-based browsers […] this doesn't work on Firefox when running native Wayland windows It seems like a WebExtension using dispatchEvent could solve both these issues.
https://unix.stackexchange.com/a/87839
> It seems like a WebExtension using dispatchEvent could solve both these issues.
Great idea! Couldn't find anything any pre-existing project like that from a quick web search and tbh I have enough side projects as it is, but that would indeed solve the issue for both.