in reply to How do you simulate the use of the keyboard ?
Note that the value of TIOCSTI can be had from some "use something" that escapes me at the moment, but it'll end up looking like this pretty close.sub jam { $TIOCSTI = 0x80017472; for (split(//, $_[0])) { ioctl(STDERR, $TIOCSTI, $_) || die "bad TIOCSTI: $!"; } } jam("y\n");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do you simulate the use of the keyboard ?
by Anonymous Monk on Sep 25, 2003 at 12:00 UTC |