On this page:
viewport-flush-input

12 Flushing

procedure

(viewport-flush-input viewport)  void?

  viewport : viewport?
Empties all mouse and keyboard events in the input buffer of viewport.