Used to use reWASD and sometimes AutoHotkey on windows, but neither of these have linux support. Googling returns a couple of solutions but they’re for x11.
I’m considering just giving up and writing macros in python, but that makes it a great deal more difficult to make quick and dirty scripts
https://tube.jeena.net/w/nhWrNZpPG5ribE7MYYh3TF This is how I do it for OBS in GNOME and Wayland.