←back to thread

Gregglogger

(untested.sonnet.io)
43 points rpastuszak | 1 comments | | HN request time: 0s | source
Show context
AtlasBarfed ◴[] No.42211542[source]
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?

replies(1): >>42211738 #
serbuvlad ◴[] No.42211738[source]
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.

replies(1): >>42218448 #
1. AtlasBarfed ◴[] No.42218448[source]
Thanks