by nkellenicki · 5y ago · 0 comments
Some of the original Yubikeys worked this way, and there are some barcode scanners out there that emulate keyboards too. I've seen some web based implementations go to great lengths to hide this fact.
I'd certainly prefer something like un-typeable keycodes to listen for as start/end markers.
Presumably you know the length of the string generated by the barcode reader, so you just set the max length of the text field to that length, and/or ignore anything longer via JS.