You can use a timer to detect the end of input, unlike a real person the characters should all be input quickly. Start the timer on the first keystroke. If you know the number of characters in the QR code you can that also check the length.
Handling Input from QR Code Handheld Scanner
Hello everyone and thanks for the help in advance. I am developing a MVC page that accepts input from a handheld QR code scanner. What I would like to accomplish is to allow rapid input by setting the focus of the cursor and then using an onChange event or onInput event to automatically post the scanned data to the controller. The problem in trying this is that it appears the scanner works exactly like a keyboard (no surprise I guess) rather than acting like a paste event. If this is the case, I can't think of another way to handle this without the user have to hit enter after each scan. Any help would be appreciated.