Wim,

Two ways that I know of.  First, if your readers allow you to "program" them
to send some kind of introductory char or chars in front of each scan.  If
you can make each of them different you can just pull them off the fromt of
the input string and determine that way.  Secondly, you can try to find a
usb reader that supports HID.  I think most of the usb readers just emulate
a keyboard wedge so you need to be sure it also has HID capabilities.  You
will need to set up each HID device in your program.  I use HIDKomponete I
think you can get off of Project JEDI to make that job much easier.

Jerry Sands


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Wim Sterns
Sent: Monday, February 05, 2007 2:41 AM
To: Borland's Delphi Discussion List
Subject: RE: which keyboard was it

Jerry, Rob,

Thanks for your replies.
Sorry for my late reaction (I went skiing last week)

This is what I am trying to do
My PC has a keyboard wedge scanner and a keyboard.
The keyboard is not accesible by the user
The user must swipe his magnetic cards to generate
input in my program.
He has no screen where he can see what is happening.
He just knows that it is scanned correct when the
scanner beeps "OK"
My application always has the focus on an edit
control, so the data gets there and is further
processed.
All this works just fine with ONE scanner.

Now my problem
I want to add a second scanner (and possibly even a
third) to the PC.
So my question is. How can my application tell which
scanner fills the edit control.
And what if the two scanners are simultanously used?
I suppose the inputs mix up in my edit control?

So when the keyboard wedge sends a "keystroke" to my
application, I like to know from which scanner is
comes.

>From what I understand this is not possible?
And I have to buy another type of scanner to do so?

Is there really no way to differentiate ?

Thanks
Wim



--- Jerry Sands <[EMAIL PROTECTED]> wrote:

> The keyboard wedge type of scanner can be handy and
> it can be a pain.  I am
> sure Wim wants to control the scanner in some way. 
> In my programming I
> prefer to know where the input is coming from.  Your
> program needs to be
> ready to accept keyboard input (some control has
> focus and accepts keyboard
> input).  In my programming I like to be able to read
> a barcode or a magnetic
> strip from a credit card in the background so to
> speak.
> 
> There are USB devices out there that can do that. 
> There are also USB
> devices that emulate a keyboard wedge as well - not
> what I want nor
> apparently what Wim is looking for.
> 
> Jerry Sands
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Rob Kennedy
> Sent: Friday, January 26, 2007 11:41 AM
> To: Borland's Delphi Discussion List
> Subject: Re: which keyboard was it
> 
> Wim Sterns wrote:
> > I have a pc with a barcode reader and two
> keyboards
> > attached to it.
> > The barcode reader emulates also a keyboard
> (keyboard
> > wedge)
> >
> > How can I see if a keystroke was sent by one of
> the
> > keyboards (and which) or by the barcode reader ?
> 
> No. That's the point of having the barcode scanner
> pretend to be a
> keyboard -- so you *don't* have to write additional
> code to read barcodes.
> 
> As far as any user-mode program is concerned, there
> is just one keyboard
> attached to the computer. Even the kernel might not
> know the difference.
> As long as the hardware sends the same signals as a
> keyboard would send,
> it should pass for being the same device.
> 
> So, what are you trying to do?
> 
> -- 
> Rob
> 
> 
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
> 
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
> 



 
____________________________________________________________________________
________
Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to