How to force keystrokes into the buffer on Unix



I know there is a way to do this - that is, a system call that allows
you to push a character into the keyboard buffer - but I can't seem to
find it now (checked man pages for tty, termio(s) on several systems).

I found a workaround, with expect, like this:

expect -c 'spawn program;expect something;send key;interact'

but I'd prefer to avoid that as it brings in the overhead of expect and
a tty layer just to push one key. Anyway, I think I did this a long
time ago and that it is TIOsomething. Can anyone help?

.



Relevant Pages

  • Re: How to force keystrokes into the buffer on Unix
    ... you to push a character into the keyboard buffer - but I can't seem to ... a tty layer just to push one key. ...
    (comp.unix.programmer)
  • Re: How to force keystrokes into the buffer on Unix
    ... you to push a character into the keyboard buffer - but I can't seem to ... a tty layer just to push one key. ... I don't think you can avoid the overhead of a tty layer. ... Assume I have an app that is reading and writing the keyboard, ...
    (comp.unix.programmer)
  • Re: How to force keystrokes into the buffer on Unix
    ... find it now (checked man pages for tty, ... a tty layer just to push one key. ... I don't think you can avoid the overhead of a tty layer. ... there would be nothing to push the character into. ...
    (comp.unix.programmer)
  • Re: The age of faces vs. heels is over
    ... >>I thought WCW died because they didn't push the young talent of the ... a wrestler's character SHOULD NOT change 100% ... WWE does this constantly and usually it ... The heel will come out the night after ...
    (rec.sport.pro-wrestling)
  • Re: How to force keystrokes into the buffer on Unix
    ... gazelle@xxxxxxxxxxxxxxxxxxxxx (Kenny McCormack) wrote: ... Barry Margolin wrote: ... a tty layer just to push one key. ... received the character pointed to by cp. ...
    (comp.unix.programmer)