Equivalent to xdotool for Wayland

This is because such features have been explicitly removed from Wayland for security reasons. The major concerns were reading other programs input and allowing fake input to be sent to other programs which would allow different attack vectors.

Some window-managers might implement some sort of macro feature in the future but as of now there is no such feature that I know of.

Implementing this would mean to implement it for each of the different window managers which surely will take still a while.

I suggest using Xorg instead of Wayland for now if you need to use such features.


There is the ydotool package for wayland:

Package ydotool

Generic command-line automation tool (no X!)

https://github.com/ReimuNotMoe/ydotool

Performs some of the functions of xdotool(1) without requiring X11 - however, it generally requires root permission (to open /dev/uinput)

Currently implemented command(s):

  • type - Type a string
  • key - Press keys
  • mousemove - Move mouse pointer to absolute position
  • mousemove_relative - Move mouse pointer to relative position
  • mouseup - Generate mouse up event
  • mousedown - Generate mouse down event
  • click - Click on mouse buttons
  • recorder - Record/replay input events

N.B. optionally, you can start the ydotoold daemon with:

  • systemctl enable ydotool
  • systemctl start ydotool

Version: 0.1.9