LinuxCommandLibrary

ydotool

TLDR

Start daemon

$ ydotoold
copy
Left click
$ ydotool click 0xC0
copy
Right click
$ ydotool click 0xC1
copy
Press Alt+F4
$ ydotool key 56:1 62:1 62:0 56:0
copy

SYNOPSIS

ydotool COMMAND [OPTIONS]

DESCRIPTION

ydotool simulates keyboard and mouse input on Linux. Unlike xdotool, it works on both X11 and Wayland by using the kernel uinput module.
Requires the ydotoold daemon to be running.

PARAMETERS

click CODE

Simulate mouse click (0xC0=left, 0xC1=right, 0xC2=middle)
key KEYCODE:STATE...
Simulate key press/release (1=press, 0=release)
type TEXT
Type text string
mousemove X Y
Move mouse to position

CAVEATS

Requires ydotoold daemon running. Needs access to /dev/uinput. Key codes are hardware scancodes, not X11 keysyms.

SEE ALSO

xdotool(1), wtype(1)

Copied to clipboard