13
\$\begingroup\$

I'm thinking of making a game that requires two mice to play. It needs to register the movement separately from one another. Is this possible? Or does the Windows architecture not allow for such things?

\$\endgroup\$
4
  • \$\begingroup\$ Something for recent inquisitions, this is still in beta and works pretty well. Get the free beta download here: pluralinput.com \$\endgroup\$
    – StaticVoid
    Nov 26 '14 at 14:22
  • 1
    \$\begingroup\$ FWIW, this and this could be an entry point to get this going. I did not test this. Thanks to this post for pointing this out. (Links have been harvested by the Wayback machine.) \$\endgroup\$
    – Vaillancourt
    May 13 '21 at 14:46
  • \$\begingroup\$ @Vaillancourt you know how links to articles are a bad idea? This may not have been an answer, but IMHO the same applies to comments. If you have some valuable insight, why not make it an awnser. \$\endgroup\$
    – rioki
    May 13 '21 at 18:01
  • 2
    \$\begingroup\$ @rioki Yes, links are bad, generally, and if I had all the time in the world, I'd gladly spend a day or two making a prototype and share an answer with y'all so that this question would finally get a decent solution. I would also do the same with every other questions to which I comment with a link. Unfortunately, there are other things that require my attention, on this site and away from this site. So the least I could do is give a pointer to someone who asked about it recently. Maybe someone else will pick this up and post an answer. \$\endgroup\$
    – Vaillancourt
    May 13 '21 at 18:28
5
\$\begingroup\$

Because mice are just another kind of HID (human interface device) you can plug in as many as you want, but custom software is required to actually do anything with them, as Windows API will typically offer functions to get "the" mouse pointer.

There are some links over SuperUser, but be advised the answers there mainly contain links (sometimes dead) to vaporware, phantomware, and an academic article on ergonomics from 2004. There may be no real solutions there.

\$\endgroup\$
0
0
\$\begingroup\$

Looks like it can be done using calls to user32.dll to the GetRawInput* methods.

There is an example of how to do this in rawinput-sharp.

I apologize for the link-only answer but the solution would make for quite a long post. The first link is the official documentation and the second is a C# wrapper you can use.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .