LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-28-2009, 05:05 AM   #1
ellappan
LQ Newbie
 
Registered: May 2009
Posts: 14

Rep: Reputation: 0
"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)
 
Old 05-28-2009, 09:42 AM   #2
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
If you are using a keyboard wedge scanner - NO.
 
Old 05-28-2009, 08:11 PM   #3
ellappan
LQ Newbie
 
Registered: May 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mickza View Post
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?
 
Old 05-28-2009, 08:46 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
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.
 
Old 05-29-2009, 02:17 AM   #5
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
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
 
Old 05-29-2009, 02:40 AM   #6
ellappan
LQ Newbie
 
Registered: May 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mickza View Post
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....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The "Log out" and "Lock screen" actions cannot be executed through keyboard shortcuts Snood Linux - Desktop 0 04-22-2009 09:30 AM
"urgent" Can't Install Glusterfs "ubuntu 8." sjahed Linux - Newbie 1 07-02-2008 02:13 PM
Do you view uninformative thread subjects like "urgent", "please help", etc. bigrigdriver General 17 02-21-2008 01:08 AM
"<" ">" Keyboard keys on Toshiba Satellite 1005-s157 dont work RodCas Linux - Laptop and Netbook 1 05-08-2004 04:22 PM
gnome global settings "Help Me!!" or "URGENT" Fascistchicken Linux - Software 3 01-26-2004 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration