Skip to content Skip to sidebar Skip to footer

Barcode Scanner In Javascript? Or Plugin/extension

I'm looking at writing a USB barcode scanner interface to a web application (offline app). By this I mean that the scanner will be on the client machine not server. So I was wond

Solution 1:

USB barcode scanners implement a HID device (the sane ones anyway), which means they act like an ordinary keyboard. The default mode of operation is to "type" out the barcode, followed by an "Enter". Some barcode scanners are highly configurable, often through scanning configuration barcodes from a chart, allowing you to change this behavior.

The only gotcha is special characters - this depends on what you are scanning.

The good news is that there is no need to write any special controls or extensions or plugins. All you need to do is auto focus on the input control and accept the form based on the enter key being pressed.

Post a Comment for "Barcode Scanner In Javascript? Or Plugin/extension"