No description
Find a file
2023-01-21 13:30:35 +00:00
.gitignore add .gitignore 2023-01-21 13:30:35 +00:00
80-dotool.rules add keyboard layout udev rule 2023-01-21 13:30:35 +00:00
dotool.go add --version, rearrange, and overhaul install 2023-01-21 13:30:35 +00:00
dotoolc use >&2 instead of >/dev/stderr 2022-11-01 10:26:02 +00:00
dotoold use >&2 instead of >/dev/stderr 2022-11-01 10:26:02 +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 install: let $DOTOOL_VERSION set --version 2023-01-21 13:30:35 +00:00
keys.go stop x:backspace simulating shift 2022-12-17 21:28:48 +00:00
LICENSE initial commit 2022-10-22 13:41:10 +01:00
README.md readme: format 2023-01-21 13:30:35 +00:00
uninstall.sh include udev rule and add uninstall.sh 2022-10-24 11:21:05 +01:00
xkeys.bash stop x:backspace simulating shift 2022-12-17 21:28:48 +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.

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

Install From Source

With go (>=1.19) run:

sudo ./install.sh

Usage

dotool will require root permissions unless you are in group input. See:

dotool --help

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

Numen, Chat and Contact

dotool was written for Numen Voice Control and you're very 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 John Gebbie