Command to simulate keyboard input
Yes, it is xdotool
.
To simulate a key press, use:
xdotool key <key>
For example, to simulate pressing F2
:
xdotool key F2
To simulate pressing crtl + c
:
xdotool key ctrl+c
To simulate pressing ctrl + c
and then a Backspace
:
xdotool key ctrl+c BackSpace
Check man xdotool
to get more idea.
You might need to install the xdotool
package first to use xdotool
command.