I've got an app that takes mag card swipes and barcode scans.
If a person gets "out of order", my QC logic will warn them and clear out the field. But if this is the result of an automatic scan, there still might be characters about to be sent to the field after I clear it out.
How do I drain the keyboard buffer?