多个鼠标指针?
有没有一种方法可以分别接受来自多个鼠标的输入? 我对制作一个多用户应用程序很感兴趣,我认为如果可以让 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以尝试 Microsoft Windows MultiPoint 软件开发套件 1.1
或新版本
Microsoft Windows 多点软件开发工具包1.5
和主要 Microsoft Multipoint 站点
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
是的。 我知道至少有一个程序可以做到这一点,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.
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.
您可以将 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 themIDirectInputDevice8::Poll()
. This should almost definitely work with any number of mice, keyboards, and other input devices. MSDN has really good documentation on this.我有一种模糊的感觉,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.
请参阅我的答案(避免使用 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?