"URGENT" is it possible to differentiate keyboard and barcode?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"URGENT" is it possible to differentiate keyboard and barcode?
Hi All,
Urgently looking for a idea....in my system both keyboard and barcode reader used....is there any way to differenciate these two input? I want to handle barcode data in my application. Currently barcode readers output going to standard output(screen)
Please do not use "urgent" in your threads. Your problem is not urgent for those that volunteer their free time to help.
Scanners typically use either a serial (RS-232), USB or PS/2 interface. The most compatable USB scanner emulates a keyboard and obviously does not require special drivers and therefore basically OS independent. The PS/2 scanner is also called a wedge because it connects in between the computer and keyboard. They (USB & PS/2) are designed to act just like a keyboard and therefore whatever is scanned will appear as typed text i.e. standard output.
There is no way to tell the difference using a wedge. With USB it should be possible if you wrote your own driver.
Just a thought - most (some?) scanners can be programmed to add a prefix ID of your own design to the data returned which you could conceivably use to flag barcode input, check your scanners user guide.
I've checked two of the brands we have used (we never seem to be able to get the same brand/model on a regular basis), one allows a 4 digit numeric only ID the other seems to permit alphanumeric of variable length so there's no standard in play here.
Not an elegant or recommended solution but you said you were looking for ideas
Just a thought - most (some?) scanners can be programmed to add a prefix ID of your own design to the data returned which you could conceivably use to flag barcode input, check your scanners user guide.
I've checked two of the brands we have used (we never seem to be able to get the same brand/model on a regular basis), one allows a 4 digit numeric only ID the other seems to permit alphanumeric of variable length so there's no standard in play here.
Not an elegant or recommended solution but you said you were looking for ideas
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.