By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,626 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,626 IT Pros & Developers. It's quick & easy.

Interaction with two mouse

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
> 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
Jul 18 '05 #2

P: n/a

"Josiah Carlson" <jc******@nospam.uci.edu> wrote in message
news:c0**********@news.service.uci.edu...
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


Jul 18 '05 #3

P: n/a
"Michele Diegoli" <m.*******@cineca.it> wrote...
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.
Jul 18 '05 #4

P: n/a
> 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
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.