By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,561 Members | 3,127 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,561 IT Pros & Developers. It's quick & easy.

Keyboard/Barcode scanner keypress question

P: n/a
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.
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

Darren Coleman wrote:
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.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.