473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Exclusive access to keyboard device input.

I'm working on an application (OEM) using c# that uses input from a keyboard
and a USB Barcode Scanner.

I need to be able to identify keystrokes from the barcode scanner and remove
them from the message queue, regardless of what application has focus.

I can identify the keystrokes and input device by registering for raw input
(RegisterRawInputDevices) and processing the WM_INPUT message. This gives
me the keystrokes and the ability to identify the USB Scanner. I have
looked into DirectInput, but it is my understanding that it uses WM_INPUT
underneath, and gives me no more information or ability than I currently
have.

I can cancel keystrokes using WH_KEYBOARD_LL and returning "-1" from my
callback.

*** Here's The Issue ***

However, the keyboard hook (WH_KEYBOARD_LL) is processed BEFORE the raw
input (WM_INPUT). When I cancel the keystrokes in the hook, the raw input
never appears.

I'm at a loss on how to resolve this situation. I do not want to write a
device driver (keyboard filter) for the barcode scanner as the scanner is
3rd party, and I do not have control over what scanners will be used. I
feel like I'm 90% there, and there must be something simple I'm missing.

Does anybody have any ideas on:

1. Finding a way to GetRawInputData from within the WH_KEYBOARD_LL hook.
2. Finding a way to cancel keystrokes from within the Raw Input handler.
3. Alternative solution I have not explored...

Thanks,

-Steven

lo*********@dodgeit.com
(do not reply to this email, it is just for newsgroup postings)

Sep 6 '06 #1
1 6778
If you come up with a solution to this problem, please e mail me. I am
in a similar situation. Thanks

Oct 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chris | last post by:
Here's the situation: I work at a scientific institution and I have a portable electronic device which is used to take measurements. The device produces a very small amount of numerical data,...
23
by: herrcho | last post by:
What's the difference between STDIN and Keyboard buffer ? when i get char through scanf, i type in some characters and press enter, then, where do the characters go ? to STDIN or Keyboard...
7
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it...
2
by: Dan | last post by:
I have an application that uses a COM port barcode scanner. This uses a listener to notify the application when a barcode has been scanned. The application now needs to be modified to use a Human...
0
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
2
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
1
by: Louis Cypher | last post by:
I'm working on an application (OEM) using c# that uses input from a keyboard and a USB Barcode Scanner. I need to be able to identify keystrokes from the barcode scanner and remove them from the...
0
by: JGilis | last post by:
Whell here's the problem ... i'm working on a barcode program in VB.NET 2005 form. At one point the users will have to identify with 3 letter code like this Homer Simpson will become HSI. They...
3
by: =?Utf-8?B?cHJvZ2dlcg==?= | last post by:
I have a C# application that hosts an AxWebBrowser control which I automate by sending mouse clicks and keyboard input. I have had various problems in doing this due to a bug in the AxWebBrowser...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.