How to read data from a USB HID device?

I am making an application to run in the background at a checkpoint for reading input using a usb scanner. How can I get scanner input from c #? And is it possible to distinguish between a scanner and a usb keyboard? (The scanner is a HID device)

+4
source share
1 answer

I did this successfully before using the "Raw Input" implementation in CodeProject:

It allows you to receive both input data (which "keys" are pressed if it imitates a "keyboard") and also distinguish from which device it came from.

+10
source

All Articles