Connecting Tech Pros Worldwide Help | Site Map

Interaction with two mouse

Michele Diegoli
Guest
 
Posts: n/a
#1: Jul 18 '05
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


Josiah Carlson
Guest
 
Posts: n/a
#2: Jul 18 '05

re: Interaction with two mouse


> Hi to everybody,[color=blue]
> I have an hard question:
> I want to use two indipendent mouse with my application.
> How can I implement this?[/color]

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
Terry Reedy
Guest
 
Posts: n/a
#3: Jul 18 '05

re: Interaction with two mouse



"Josiah Carlson" <jcarlson@nospam.uci.edu> wrote in message
news:c00ivu$k6q$1@news.service.uci.edu...[color=blue]
> 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?[/color]

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




David M. Wilson
Guest
 
Posts: n/a
#4: Jul 18 '05

re: Interaction with two mouse


"Michele Diegoli" <m.diegoli@cineca.it> wrote...
[color=blue]
> I have an hard question:
> I want to use two indipendent mouse with my application.
> How can I implement this?[/color]

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.
Josiah Carlson
Guest
 
Posts: n/a
#5: Jul 18 '05

re: Interaction with two mouse


> I would imagine that Windows stops mouse detection after it finds one[color=blue]
> 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.[/color]

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
Closed Thread