Detecting signals from multiple mouse-based hardware

  • Thread starter Przemek M. Zawada
  • Start date
P

Przemek M. Zawada

Dear Group,

I have got two mice connected to one PC (notebook).
In example I click parallel left button on mouse A and left button on
mouse B. Is it possible, programmatically detect which on which mouse
which button has been clicked?

Mainly, the thing what I'm doing is to connect to 'scroll button
click' a Halls sensor (contactron), one for each mouse, and I need to
count down the sensor signals. The simplest way is to fetch the mouse
events with C#, but what would happen in case of two mice?

Those mice are connected via USB port - no way to do it via RS232
port. Shall I detect a hardware on USB port and then read data from
it? In fact I'm interested in reading signal from exactly one button
for each of mice's. I cannot define that one sensor is left button and
another sensor is right button, because the third mouse (notebook
touchpad) is used normally, so I cannot bind 'common-use buttons'. Any
ideas?

Thank you for all answers!

All the best,
Przemek M. Zawada
 
P

Peter Duniho

Przemek said:
I have got two mice connected to one PC (notebook).
In example I click parallel left button on mouse A and left button on
mouse B. Is it possible, programmatically detect which on which mouse
which button has been clicked?

I don't think this is possible using the .NET classes directly. I'm not
even sure it's possible in the regular unmanaged Win32 API. You will
probably have to use DirectInput, which allows for complete enumeration
and management of all input devices.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top