Any KBD events that have been logged but not yet serviced are canceled and the keyboard buffer is cleared.
Execution of an OFF KBD statement within a subprogram will disable the ON KBD definition within the context of the subprogram, but when control is returned to the calling program the ON KBD definition is re-enabled. The keyboard buffer remains cleared.