Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to scan barcodes into a process in the background?

I'm making a gym management web app that handles sign-ins. Members have a barcode on a tag that they scan when they arrive to the gym.

I've heard that most barcode scanners simply act as a keyboard. This would require the scanning-in page to be open and in the foreground when a barcode is scanned.

If it's just a keyboard, how would I send the barcode scanner input to a single background process running on the computer, and have it ignore by all processes that may be in focus?


1 Answers

You're right that most scanner can support HID in keyboard emulation, but that's just the start.

If you want to have a bit more control over the data you can use a scanners that support the OPOS driver model.
Take a look at Zebra's Windows SDK to have a overview of the things that you can do. It may be a better solution than try to steal the barcode data coming in the OS as a keyboard entry to the foreground app.

Disclaimer: I work for Zebra Technologies
Other Barcode scanner vendor support a similar driver model.

like image 168
pfmaggi Avatar answered Sep 21 '25 02:09

pfmaggi