The LazyBoy Library Manual - KeyFlush

Part of the Keyboard group.

%imacro KeyFlush 0

Clear all keystrokes from buffer.

All pending keystrokes will be flushed from the input buffer.

NOTE: Under DOSBox (Staging) while using FreeCOM under the DOSBox kernel, I have noticed that when there are pending keystrokes left in the buffer and the program terminates, then FreeCOM exits without error. This occurs even with FreeCOM internal commands like dir. It may be prudent to always flush the keyboard buffer at program exit.