Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading a barcode using a USB barcode scanner along with ignoring keyboard data input while scanner product id and vendor id are not known

Tags:

People also ask

How does USB barcode scanner work?

The USB barcode scanner is the most popular and widely sold scanner on the market today. This scanner is directly plugged into the USB port on your computer. Once you connect the scanner to the computer using the USB port, the scanner will be recognised by the computer as a second keyboard device.

How do I tell if keyboard input is coming from a barcode scanner?

Meaning that you can tell them to prefix (and/or suffix) their input with some sentinel characters that indicate the input is coming from the barcode scanner, rather than a standard keyboard. (Check your barcode scanner's user manual for more information.)

What is the input data for the barcode scanner?

Barcode Scanner Input reads data from the integrated barcode scanner built into the device, attached via cable or Bluetooth or implemented as a snap-on module. DataWedge supports lasers, imagers and internal cameras.

What is a barcode reader used for input and how?

A barcode reader, also called a price scanner or point-of-sale ( POS ) scanner, is a hand-held or stationary input device used to capture and read information contained in a bar code .


Is there a way to read from a USB barcode reader while ignoring the keyboard and not knowing the PID or VID of the USB scanner? I know that there is a way of differentiating between USB scanner input and keyboard input by using the VID and or PID of the USB scanner; this was done using code from http://nicholas.piasecki.name/blog/2009/02/distinguishing-barcode-scanners-from-the-keyboard-in-winforms/ But is there another solution to differentiate between keyboard and USB scanner without putting the scanner's VID or PID in a configuration file (or source code)? The reason for not wanting to put various VIDs or PIDs in a configuration file is that, the application being developed will be deployed on numerous laptops and have arbitrary types of scanners attached to them.

Also, I don't want to configure the scanner's with a starting and or ending sequence that would be outputted, since the scanner is being used by other software on the same machine as well and I don't want to have to change the code on the other software. I don't want to program the barcode reader to be in serial mode either for the same reason mentioned previously.