No description
Find a file
2022-10-23 11:27:26 +01:00
dotool.go add keydelay and typedelay subcommands 2022-10-23 11:27:26 +01:00
dotoolc dotoolc: use exec 2022-10-22 18:38:19 +01:00
dotoold dotoold: improve signal handling 2022-10-22 18:37:37 +01:00
go.mod initial commit 2022-10-22 13:41:10 +01:00
go.sum initial commit 2022-10-22 13:41:10 +01:00
install.sh initial commit 2022-10-22 13:41:10 +01:00
keys.go initial commit 2022-10-22 13:41:10 +01:00
LICENSE initial commit 2022-10-22 13:41:10 +01:00
README.md initial commit 2022-10-22 13:41:10 +01:00
xkeys.bash initial commit 2022-10-22 13:41:10 +01:00

dotool

dotool reads commands from stdin and simulates keyboard and mouse events. It works everywhere on Linux, including in X11, Wayland and TTYs.

It takes about half a second to register the virtual device, but it can be kept using the daemon.

Install

Run go build with go (>=1.19) and copy dotool, dotoold and dotoolc into your PATH.

Usage

dotool will usually require root permissions unless you add a udev rule for uinput. You could run these commands to add a rule for yourself and make it effective:

echo KERNEL==\"uinput\", GROUP=\"$USER\", MODE:=\"0660\" | sudo tee /etc/udev/rules.d/99-dotool-$USER.rules
sudo udevadm trigger

This greets the world: echo 'type Sup, Lads!' | dotool

This screams for three seconds: { echo keydown A; sleep 3; echo key H shift+1; } | dotool

This drags the mouse: printf %s\\n 'buttondown left' 'mousemove 0 100' 'buttonup left' | dotool

The daemon and client, dotoold and dotoolc, can used to keep a persistent virtual device for a quicker initial response:

dotoold &
echo 'type super' | dotoolc
echo 'type speedy' | dotoolc

Contact

You can ask a question or send a patch by composing an email to ~geb/public-inbox@lists.sr.ht.