Interaction with two mouse

  • Thread starter Michele Diegoli
  • Start date
M

Michele Diegoli

Hi to everybody,
I have an hard question:
I want to use two indipendent mouse with my application.
How can I implement this?

--Michele Diegoli
 
J

Josiah Carlson

Hi to everybody,
I have an hard question:
I want to use two indipendent mouse with my application.
How can I implement this?

Good question. On windows platforms, windows automatically multiplexes
the movement of two (or more) mice into a single movement. If you have
two mice in windows, and move them in exact opposite directions, your
cursor won't move.

I have a feeling that linux, or really any other system that /can/
handle multiple mice do the same thing.


This may suggest that it is an operating system architectural limitation
because no one wanted to answer the question, what would it mean for two
mouse pointers to be wandering around the screen?

- Josiah
 
T

Terry Reedy

Josiah Carlson said:
This may suggest that it is an operating system architectural limitation
because no one wanted to answer the question, what would it mean for two
mouse pointers to be wandering around the screen?

Given that I use my mouse alternately with both hands, I can easily imagine
having two distinguisable pointers that do different things. In an editor,
one could select text, while the other selects buttons and menu operations.
In a game, one could move and attack chars while other operates peripheral
functions. Not having to move the personnel pointer (and maybe lose
current selection) to open a building or log book could be quite nice.

Terry R. Reedy
 
D

David M. Wilson

Michele Diegoli said:
I have an hard question:
I want to use two indipendent mouse with my application.
How can I implement this?

Assuming you mean Windows, and assuming there is no way of disabling
the multiplexing effect of Windows (see other peeps' posts), then
perhaps you could write a very small driver to loop reading from an
RS232 port and working out the current coordinates.

I would imagine that Windows stops mouse detection after it finds one
on the USB bus and/or the PS/2 port, with RS232 being a fallback. So
if you have one mouse plugged into the PS/2 port, then booting with
another connected to the RS232 port leaves it free for apps to talk
to.

What you do with the events received from this little driver is up to
you. I can imagine < 100 lines of code implementing enough to generate
move and click events.

A bit of a crazy suggestion, but might be a useful fallback if you
find no other solution. :)


David.
 
J

Josiah Carlson

I would imagine that Windows stops mouse detection after it finds one
on the USB bus and/or the PS/2 port, with RS232 being a fallback. So
if you have one mouse plugged into the PS/2 port, then booting with
another connected to the RS232 port leaves it free for apps to talk
to.

I believe Windows will initialize any mouse it sees during boot. Using
a mouse on a serial port may require leaving the mouse unplugged until
Windows has finished booting.

- Josiah
 

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

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top