.gitignore | ||
50-dotool.conf | ||
80-dotool.rules | ||
_install.sh | ||
CHANGELOG.md | ||
dotool.go | ||
dotool.sway | ||
dotoolc | ||
dotoold | ||
go.mod | ||
go.sum | ||
install.sh | ||
keys.go | ||
LICENSE | ||
README.md | ||
uninstall.sh | ||
xkeys.bash |
dotool
dotool reads commands from stdin and simulates keyboard and mouse events. It works everywhere on Linux, including in X11, Wayland and TTYs.
Install From Source
With go
installed, run:
sudo ./install.sh
Permission
dotool requires permission to /dev/uinput
to create the virtual input
devices, and a udev rule grants this to users in group input.
You could try:
echo type hello | dotool
and if need be, you can run:
sudo groupadd -f input
sudo usermod -a -G input $USER
and re-login and trigger the udev rule or just reboot.
Usage
See dotool --help
, but this greets the world:
echo 'type Sup, Lads!' | dotool
and this screams for three seconds:
{ echo keydown A; sleep 3; echo key H shift+1; } | dotool
Each instance takes about half a second to register the virtual input devices,
but you can keep writing commands to one instance or use the daemon and client,
dotoold
and dotoolc
:
dotoold &
echo 'type super' | dotoolc
echo 'type speedy' | dotoolc
Numen, Chat and Contact
dotool was written for Numen Voice Control and you're welcome to join the Matrix chat at #numen:matrix.org.
You can also send questions, thoughts or patches by composing an email to ~geb/public-inbox@lists.sr.ht.
Support Me
License
GPLv3 only, see LICENSE.
Copyright (c) 2022-2023 John Gebbie