How to clear keyboard buffer in C # using Windows Forms?
I have a barcode scanner that acts like a keyboard. If a really long barcode is scanned and the cancel button is pressed on the form, I need the keyboard buffer to be cleared. Therefore, I need to clear and ignore all pending input. I need to clear the buffer because if the barcode contains spaces, spaces are treated as keystrokes that are not needed.
c # keyboard buffer flush
Amar patel
source share