Emulate keyboard in linux

1.5k views Asked by At

I need to emulate a key into a particular process running, i have no control about it's source code and Xserver isn't running, I believe the proc is using directfb to handle keyboard inputs.

1

There are 1 answers

0
Paulo Scardine On

You should be able to open a virtual terminal (fire a 'man 7 pty' to read the docs).

You can also run the app inside a detached screen and use the 'stuff' command to send input to the virtual window. Try it on the command line:

Start the application:

$ screen -S sessioname -d -m /path/command

Send input:

$ screen -S sessioname -X stuff 'input line 1
input line 2
...
input line n
'