多个鼠标指针?

发布于 2024-07-08 10:22:47 字数 384 浏览 12 评论 0原文

有没有一种方法可以分别接受来自多个鼠标的输入? 我对制作一个多用户应用程序很感兴趣,我认为如果可以让 2 个或更多用户持有无线鼠标,每个用户都使用单独的鼠标箭头单独与应用程序交互,那就太好了。

这是我应该尝试外包给其他应用程序/驱动程序/os_magic 的东西吗? 或者有一个库可以用来完成这个任务吗? 语言并不是什么大问题,但 C、C++ 和 Python 是更好的选择。

谢谢:)

编辑:

找到了这个Linux多指针工具包(它实际上是一个多指针x服务器): http://wearables.unisa.edu.au/mpx/

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/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

原野 2024-07-15 10:22:47

是的。 我知道至少有一个程序可以做到这一点,KidPad。 我认为它是用 Java 编写的,由现在在大学的 Juan Pablo Hourcade 开发爱荷华州。 你必须问他这是如何实施的。

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.

风为裳 2024-07-15 10:22:47

http://code.google.com/p/pymultimouse/ 是一个使用 Windows 的库原始输入,它在 2 只老鼠的测试中有效。

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

且行且努力 2024-07-15 10:22:47

您可以将 DirectInput 与 C/C++ 一起使用(可能也有其他语言的绑定)。 您使用 IDirectInput8::EnumDevices()(使用 DX8;相同的功能,不同版本的 DirectX 中的接口)获取所有连接设备的列表。 然后,创建设备并轮询它们 IDirectInputDevice8 ::Poll()。 这几乎肯定适用于任意数量的鼠标、键盘和其他输入设备。 MSDN对此有非常好的文档。

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.

傲世九天 2024-07-15 10:22:47

我有一种模糊的感觉,BeOS 曾经让一对鼠标和键盘并具有单独的活动窗口和输入。 哇……那是很久以前的事了。 我认为“结对”编程会非常有趣。

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.

恋竹姑娘 2024-07-15 10:22:47

请参阅我的答案(避免使用 JNI 内容): How can I handle multiple mouse input in Java?< /a>

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文