[comp.sys.ibm.pc.programmer] Flushing the typeahead buffer

djb@wjh12.harvard.edu (David J. Birnbaum) (05/05/90)

In article <10151.263f01fa@vax1.cc.lehigh.edu> lubkt@vax1.cc.lehigh.edu writes:
>I do not know why a  program might want to  flush the keyboard buffer.

To which Tom Almy replies:
>Easy. You flush the input buffer to get rid of any unintentional typeahead.
>If you use the command interpreter 4DOS then the KEYSTACK function will
>do exactly what you want (it can handle buffer flushing).

I noticed that Keystack won't always help.  I use one shareware program 
that has a "reminder" screen; when you
enter the application, the "remember to pay" message is displayed until you
hit <F10>.  Keystack wouldn't feed this an <F10>, I think because the pro-
gram was getting the keystroke before it reached the keyboard buffer and
Keystack doesn't get in that early.  (I registered the program and the
reminder went away.)

-David
===================================================================
David J. Birnbaum              djb@wjh12.harvard.edu [Internet]
                               djb@harvunxw.bitnet [Bitnet]
                               ...!wjh12!djb [uucp]