ydotool is an alternative to xdotool that works on both X11 and Wayland
I’m still in the process of fully migrating to Wayland from X11 on Linux, as there are still a few niggly things that don’t work 100%. At least Wayland is now stable for me on Manjaro Plasma desktop. But one challenge was getting keystrokes and mouse actions to work on Wayland, as all my shortcut keys on my Stream Deck are set up using the great xdotool which does all that, as well as window functions.
So ydotool does do the keystrokes and mouse actions quite well (using the identical syntax on Wayland and X11) but there are some caveats unfortunately:
* It does not do any window functions like resize, move, bring into focus, or therefore, directing actions straight into a background window. And worse, even wmctrl misses some windows on Wayland – it recognised the Zoom Meeting window but not Kdenlive, but I need to test it out more thoroughly.
* It has an unintuitive syntax as everything is keycodes such as 28:1 to press and 28:0 to release instead of xdotool’s alt+g for example.
* The instructions to install are “messy” with it installing as a user service when it should be a systemwide service. It may be that the documentation is a bit out of sync.
Rest of the post at
ydotool is an alternative to xdotool that works on both X11 and Wayland![Imagem/foto](https://gadgeteer.co.za/wp-content/uploads/2024/07/ydotool.webp)
I'm still in the process of fully migrating to Wayland from X11 on Linux, as there are still a few niggly things that don't work 100%. At least Wayland is now stable for me on Manjaro Plasma desktop. But one challenge was getting keystrokes and mouse actions to work on Wayland, as all my shortcut...
#
technology #
Linux #
opensource #
Wayland