Keyboard/Barcode scanner keypress question

  • Thread starter Thread starter Darren Coleman
  • Start date Start date
D

Darren Coleman

I need help with 2 keyboard/input questions

1. How do i caputre all keypress events for my application/form?
2. How do I determine which keyboard sent the keypress?

What i'm doing is using a USB Barcode scanner, windows sees the scanner as a
keyboard. When the scanner reads a barcode it decodes the barcode and sends
in the decoded values in as keypresses from a keyboard. I want to be able to
tell the diffrence between a keypress from a keyboard and the USB Barcode
scanner.
 
You need to hook into unmanaged code to catch these events. I actually
wrote a base class form which would allow a derived form to work w/ a
CueCat. If you send me an email (to remind me), I'll send it your way
(it's at home).

It might be a good starting point for you, however the CueCat preceeded
every barcode w/ a format like: Ctrl-F12[obfuscated barcode]<return> (or
something similar). My form just registered itself for the control
keypress, and then captured everything else for the next 100ms or so.

Your situation might not work, and I'm not sure how to gather the
differences between the barcodes. Like I said, it might give you some
ideas.
 
Back
Top