17

Is there a way to accept input from more than one mouse separately? I'm interested in making a multi-user application and I thought it would be great if I could have 2 or more users holding wireless mice each interacting with the app individually with a separate mouse arrow.

Is this something I should try to farm out to some other application/driver/os_magic? or is there a library I can use to accomplish this? Language isn't a HUGE deal, but C, C++, and Python are preferrable.

Thanks :)

edit:

Found this multi-pointer toolkit for linux (it's actually a multi-pointer x server): http://wearables.unisa.edu.au/mpx/

Jiaaro
  • 74,485
  • 42
  • 169
  • 190
  • Since you have selected your preferred answer, which actually does not answer the question, please publish what you will find about it. – Davide Nov 04 '08 at 22:23
  • of course! the multipoint sdk does actually let you use multiple mice with multiple pointers though ;) – Jiaaro Nov 06 '08 at 02:34
  • 1
    Incidentally MPX will be built-in on upcoming x.org releases. It'll take a while before all the toolkits and apps are totally smooth with it though... – bobince Jan 22 '09 at 01:23
  • @bobinice very nice... looking forward to the X integration - maybe this will lead to multi-touch apps? – Jiaaro Sep 08 '09 at 13:40

6 Answers6

8

You could try the Microsoft Windows MultiPoint Software Development Kit 1.1

or the new Microsoft Windows MultiPoint Software Development Kit 1.5

and the main Microsoft Multipoint site

ShoeLace
  • 3,476
  • 2
  • 30
  • 44
5

Yes. I know of at least one program that does this, KidPad. I think it's written in Java and was developed by Juan Pablo Hourcade, now at the University of Iowa. You'd have to ask him how it was implemented.

tvanfosson
  • 524,688
  • 99
  • 697
  • 795
2

http://code.google.com/p/pymultimouse/ is a library using windows raw input, it worked in a test with 2 mice.

1

You could use DirectInput with C/C++ (there's probably also bindings in other languages). You use IDirectInput8::EnumDevices() (using DX8; same function, different interface in other versions of DirectX) to get a list of all attached devices. Then, you create the devices and poll them IDirectInputDevice8::Poll(). This should almost definitely work with any number of mice, keyboards, and other input devices. MSDN has really good documentation on this.

Adam Rosenfield
  • 390,455
  • 97
  • 512
  • 589
  • This will not work on Windows XP, you should use RawInput instead. See here: http://jstookey.com/arcade/rawmouse/ – kshahar Nov 04 '08 at 23:40
1

I have this vague feeling that BeOS used to let one pair a mouse and keyboard and have separate active windows and inputs. Wow... that was a long time ago. I thought that it would be very interesting for "paired" programming.

user31534
  • 21
  • 1
1

See my answer here (avoid the JNI stuff): How can I handle multiple mouse inputs in Java?

Community
  • 1
  • 1
kshahar
  • 10,423
  • 9
  • 49
  • 73