How do I read input from a USB HID device?

2019-01-12 01:36发布

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)

标签: c# usb hid
1条回答
Root(大扎)
2楼-- · 2019-01-12 01:58

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.

查看更多
登录 后发表回答