LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   "URGENT" is it possible to differentiate keyboard and barcode? (https://www.linuxquestions.org/questions/linux-kernel-70/urgent-is-it-possible-to-differentiate-keyboard-and-barcode-729052/)

ellappan 05-28-2009 05:05 AM

"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)

mickza 05-28-2009 09:42 AM

If you are using a keyboard wedge scanner - NO.

ellappan 05-28-2009 08:11 PM

Quote:

Originally Posted by mickza (Post 3555468)
If you are using a keyboard wedge scanner - NO.


Hi,

Thanks a lot for your help. scanner is connected through USB interface.
how to findout whether it is keyboard wedge or not?

michaelk 05-28-2009 08:46 PM

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.

mickza 05-29-2009 02:17 AM

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

ellappan 05-29-2009 02:40 AM

Quote:

Originally Posted by mickza (Post 3556226)
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

Hi,

Thank you very much I will try out this idea....


All times are GMT -5. The time now is 09:04 PM.