cpress was made for simulating keyboard input on Linux systems. It interacts with /dev/uinput
and therefore is very low level and X Window System independent. There are Python and Go bindings provided.
Be aware that by default /dev/uinput
is writable only for root.
You can start cpress as root or, before doing that, change permissions level on uinput
:
chmod +0666 /dev/uinput
cpress
handles this automatically. If permissions level is not sufficient, it asks for root password and sets modes on its own. If you want avoid permissions changes for some reason, start as root.
See Makefile
or more informations. To compile examples, type:
make example
Before doing anything with cpress
, you'll have to call initialize()
function. Then feel free to use these:
press_key(KEY_A);
press_combination(3, KEY_C, KEY_D, KEY_E);
hold_key(KEY_LEFTSHIFT);
press_key(KEY_E);
press_key(KEY_E);
release_key(KEY_LEFTSHIFT);
When you're done with cpress, simply call finish()
.
For more examples, see self-explanatory file examples/example.c
.
Simply run as root:
python2 setup.py install
Import module with:
from cpress import *
See self-explanatory file examples/example.py
for more informations.
Just use that command:
go get github.com/solusipse/cpress/go
Import package with:
import "github.com/solusipse/cpress/go"
See self-explanatory file examples/example.go
for more informations.
See LICENSE
.