How to Reset Keypresses

kb.getKeys(....., clear= True) tells the keyboard to remove / clear the returned events from the keyboard buffer; any keyboard events not returned by the call will stay in the event buffer.

To clear the full keyboard event buffer, use:

kb.clearEvents()
2 Likes