tags:

views:

101

answers:

1

I'm making an application to run in the background on a salespoint to read input from a usb scanner. How can I get the input of the scanner from C#? And can I differentiate between the scanner and a usb keyboard? (Scanner is a HID device)

+2  A: 

I did this successfully before using a “Raw Input” implementation on CodeProject:

It allows you to receive both the input (what “keys” are pressed if it mimics a “keyboard”) as well distinguish which device it came from.

Timwi
That looks pretty good. However it doesnt seem to be firing the _KeyPressed event even though it picked up my 2 HID devices.
d1k_is
Got it working, was compiling it under 32 bit on a 64 bit Windows. Thanks again.
d1k_is