No description
Find a file
2023-03-05 15:08:52 +00:00
.gitignore add .gitignore 2023-01-21 13:30:35 +00:00
50-dotool.conf add MatchProduct to X conf file 2023-02-25 22:37:57 +00:00
80-dotool.rules add keyboard layout X config file 2023-01-29 21:26:39 +00:00
_install.sh install: have ./_install.sh for packaging 2023-01-31 12:26:10 +00:00
CHANGELOG.md version 1.2 2023-02-06 11:40:01 +00:00
dotool.go omit k: and x: in error messages 2023-02-06 11:20:49 +00:00
dotool.sway add keyboard layout sway config file 2023-01-30 14:41:14 +00:00
dotoolc improve pipe error messages 2023-01-26 13:33:57 +00:00
dotoold improve pipe error messages 2023-01-26 13:33:57 +00:00
go.mod use updated opt package 2022-12-28 10:43:19 +00:00
go.sum use updated opt package 2022-12-28 10:43:19 +00:00
install.sh version 1.2 2023-02-06 11:40:01 +00:00
keys.go stop some x: keys simulating shift 2023-01-26 13:34:00 +00:00
LICENSE initial commit 2022-10-22 13:41:10 +01:00
README.md readme: improve 2023-03-05 15:08:52 +00:00
uninstall.sh include udev rule and add uninstall.sh 2022-10-24 11:21:05 +01:00
xkeys.bash stop some x: keys simulating shift 2023-01-26 13:34:00 +00:00

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

Thank you!

License

GPLv3 only, see LICENSE.

Copyright (c) 2022-2023 John Gebbie