Simulate input/Keyboard: Difference between revisions

m
Line 330:
=={{header|Perl}}==
Perl on linux can do this for PseudoTerminals (ptys) and Terminals (ttys) using [http://www.kernel.org/doc/man-pages/online/pages/man4/tty_ioctl.4.html IOCTL TIOCSTI]. The same can be done with C or any other language that can use IOCTL either natively or via [http://en.wikipedia.org/wiki/Foreign_function_interface FFI] such as [http://en.wikipedia.org/wiki/Java_Native_Interface JNI] or [http://en.wikipedia.org/wiki/Java_Native_Access JNA].
 
How to get the correct value for TIOCSTI is discussed [http://www.perlmonks.org/?node_id=10920 (here)].
 
Target may be externally created, but process must be able to open tty/pty for writing.
54

edits