以编程方式模拟操纵杆
我想使用按键和/或鼠标输入来模拟操纵杆。 因此其他程序/游戏会认为用户在使用鼠标时正在使用操纵杆。
因此,该程序将安装一种用于伪造 USB 或伪造现有操纵杆的驱动程序。
有一个名为 PPJoy 的现有程序可以做同样的事情,但遗憾的是它是封闭源代码的,需要用户独立安装并执行配置步骤。
发现这个: http://www.microsoft.com/whdc/archive/hidgame.mspx
但无法从中理解很多意义。 需要一些高级指针,以便我可以自己研究,而不是盲目地敲所有的门:)
编辑: 我正在尝试控制仅支持操纵杆的第三方程序
I want to emulate a joystick using keypresses and/or mouse input. So other programs/games will think that user is using a joystick while he is using a mouse.
So the program will install kindof a driver for fake usb or fake an existing joystick.
There is an existing program called PPJoy which does the same thing but sadly its closed source and needs the user to install it standalone and do the configuration steps.
Found this:
http://www.microsoft.com/whdc/archive/hidgame.mspx
but not able to make much sense out of it. Some high level pointers required so that I can then research on my own instead of blindly knocking all doors :)
edit:
i am trying to control a third party program which supports only joystick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅我对之前与您的问题非常相似的问题的回答。
为模拟输入设备编写 Windows 驱动程序< /a>
显然,这取决于您尝试模拟的操纵杆输入类型。 编写自定义驱动程序确实是您想要尽可能避免的事情。 您可能根本不需要这样做。
see my answer for a previous question that is really similar to yours.
Writing a windows driver for an emulated input device
Obviously it depends on what type of joystick input you are trying to emulate. Writing a custom driver is really something you want to avoid as much as you can. You may not need to do it at all.
您最好的选择是修改示例VHIDMINI - 虚拟 HID 设备示例 来自 Windows DDK。 您可以修改此示例驱动程序以模拟操纵杆 HID 设备,然后从驱动程序发送操纵杆 HID 报告。
Your best bet would be to modify the sample VHIDMINI - Sample for Virtual HID device from the Windows DDK. You could modify this sample driver to emulate a joystick HID device and then send out joystick HID reports from the driver.