Author Topic: sensor in USB HID KEYBOARD  (Read 9747 times)

jain1.anuj

  • Member
  • ***
  • Posts: 28
sensor in USB HID KEYBOARD
« on: January 10, 2012, 06:20:08 am »
hello,
i am working on a USB HID device. it's a proximity device which detects the person's distance and fire keystrokes accordingly.
i am using Hid.dll , Setupapi.dll , kernel32.dll for read/write operation.
i want to detect the distance of the object by using proximity sensor. is there any API present in .NET for this purpose?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: sensor in USB HID KEYBOARD
« Reply #1 on: January 10, 2012, 11:40:08 am »
HID reports can contain data for any purpose. You can define your own protocol for what the data in a report means and write an application that reads the reports and takes the desired action.

To emulate keypresses, see:

http://msdn.microsoft.com/en-us/library/ms171548.aspx

Jan