Comment by AtlasBarfed
8 months ago
Linux, especially wayland, is making keylogging and keypress manipulation really hard. This is hitting me in one of my passions: retro gaming.
I WANNA DO MACROS, but I haven't found any good solution for macros in linux (think dragon punch in Street Fighter or some other complex HID input sequence that teenies can master but oldass me can't)
And I understand why, it's a massive security problem, giving view powers to the keystream, to say nothing of manipulation.
I hope that retroarch eventually adds it, but they punt on it currently I think for the exact reasons I have problems with it.
Does anyone know any good solutions out there for X.org and Wayland?
There is an xdg-desktop-portal which an application can use to register a global shortcut.
https://github.com/flatpak/xdg-desktop-portal/blob/main/data...
Not sure which compositor support this and which ones don't. Hyprland, which I use, supports it.
There is also ydotool, which can emit key presses anywhere in Linux by registering a virtual uinput device.
https://github.com/ReimuNotMoe/ydotool
Using these two building blocks, it should not be very difficult to implement an application that implements global macro support.
Thanks