Had a similar problem. Barcode scanners work like keyboards, they just enter a string. The scanners can usually be configured so that they add a prefix or a postfix to the characters read from the barcode, often on a per barcode-type basis (can have different config for Code 39 than for Code 128 e.g.)
But, a problem that we had in our last project was, that the guys that developed the cashier system also configured the barcode scanner and they put a CTRL-B as a prefix in front of every barcode. In Firefox, this opens up the Bookmarks and so you′re trapped.
What I mean is, connecting the scanner is easy, but you have to care for the configuration of the scanner if there are control character that might be captured by the browser or some other software. On the other hand, this can be very useful cause you can enter a linefeed after each barcode or something else that helps you separate them.
Another important aspect in our case was the timing. The barcode scanners enter the character quite fast, but - at least the one we had - entered it one by one. So when we tested our functionality, there was a huge difference between the string pasted from the clipboard or the string scanned from the barcode. This was relevant for Ajax-Calls we did (where in our case, a ZK-based website had lots of trouble with that).
Hope that helps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…