An asetniop keyboard emulator for linux terminals.
asetniop-term
is built with make
. It accepts the device node of the keyboard as its first argument, e.g.:
> make # ./asetniop.exe /dev/input/by-path/*-kbd
Either run asetniop-term
as root, or make sure your user has read permissions on the device node (the absolute device node, not the symlink).
To debug, set the DEBUG
env var to:
DEBUG
to show device acquisitionDEBUG_EVENT
to show keydown and keyup eventsDEBUG_STATE
to show the asetniop state
like so:
> DEBUG=DEBUG_STATE make
asetniop-term
disables the terminal echo and ignores stdin
. After running, the terminal should be back to its normal state, but if not, stty echo
should fix it.
asetniop-term
does not prevent key events being read by other processes, like X11. To disable the keyboard under X11 (make sure you have some other way to control the system!) - find the device id like so:
> xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ ... ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ ... ↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]
Then disable the device, e.g.:
> xinput disable 10
- Look at pushing output to other applications?
- Write a kernel module to emulate a real keyboard?