0

I'm trying to integrate a third party hardware to one of my existing projects . Basically the hardware has two buttons with different color leds on each button.

I am able to open and close each led with the library/manual which is provided by the manufacturer without any problem. My problem is I can not handle its buttons click events from any kind of software C/C#/VB etc...

I mean when I press one of its buttons it acts like any input device and effects the cursors current position like a keyboard key or mouse click due the opened program(For example if Ms Word is opened currently it acts like space key?). The DLL or manual has no special function for this purpose (like a mouse click event?).

So what I'm asking is there any general way to handle any external device button click inside a C# program? How the currently running software suppose to understand a button is clicked and enter the desired method in the code?

Any clue or tip would be highly appreciated.

Thanks...

Vecihi
  • 261
  • 4
  • 12
  • I think this answer on another question with a similar topic may be useful to you: http://stackoverflow.com/a/7164280/996081 – cbr Mar 17 '15 at 08:28
  • possible duplicate of [How do I read input from a USB HID device?](http://stackoverflow.com/questions/3655023/how-do-i-read-input-from-a-usb-hid-device) – gbjbaanb Mar 17 '15 at 08:33
  • There is no generic way to read all devices - it depends on the device's interface. Is it USB or Serial or some custom hardware doodad? Then it depends what messages the device sends. This one sounds like its acting like a USB mouse, but even then what are the different buttons mapped to? The links to C#/USB HID on the right may help you. – gbjbaanb Mar 17 '15 at 08:35
  • Thanks for the helps. It is an USB device and it has a "readPort" method in its DLL. But the thing is I didn't understand how to program each button to write some sensible data and write a custom event handler on the program. – Vecihi Mar 17 '15 at 08:49

0 Answers0