README
🚀 IbInputSimulator
IbInputSimulator 是一个借助驱动程序模拟键盘和鼠标输入的库,它支持多种驱动程序,能满足不同场景下的输入模拟需求,为用户带来便利。
🚀 快速开始
驱动支持
-
- 无需罗技硬件。但在 G HUB 的新版本(≥ 2022.3.2300)中,鼠标驱动已被移除(#8)。遗憾的是,目前尚无已知方法安装旧版本。
- 示例:
IbSendInit("Logitech")
-
Logitech G HUB new
- 无需罗技硬件,适用于 G HUB 的新版本。在安装 G HUB 后的首次重启后,鼠标输入会停止工作。若要恢复鼠标功能,可能需要重新安装该软件。
- 示例:
IbSendInit("LogitechGHubNew")
-
- 在雷蛇 Synapse 的新版本中,需要雷蛇硬件才能使驱动可用。旧版本不需要雷蛇硬件,但雷蛇 Synapse 的在线安装程序只能安装最新版本。若要手动安装旧版本,请参阅 #7 了解详情。
- 示例:
IbSendInit("Razer")
-
- 示例:
IbSendInit("MouClassInputInjection", 1, process_id)
- 示例:
-
DD Virtual Mouse & Virtual Keyboard
- 可能会导致蓝屏;难以彻底卸载;需要网络。
- 使用时,将 DLL(
DD94687.64.dll/DD64.dll/DDHID64.dll)与脚本文件放在一起,然后:
IbSendInit("DD")
- 或者在调用 `IbSendInit` 时指定 DLL 路径:
IbSendInit("DD", 1, "C:\SomeDir\DD64.dll")
- EDI(私有,不出售)
软件兼容性
| 软件 | SendInput | Logitech | Razer | MCII | DD | EDI | DM | 其他 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Blade & Soul (Korean) | | ✔️ | | | ❗ | ✔️ | ✔️ | ❌ SendInput hook | | Genshin | High | | | | | | | |
对于 SendInput,显示 High 的软件表示目标进程通常具有较高的完整性级别,可能会因 UIPI 阻止 SendInput。简单来说,这意味着你需要以管理员权限运行输入模拟器。
支持的语言
C++
API 请参阅 InputSimulator.hpp。
AutoHotkey
- 下载:发布版本
- 使用方法:
| AutoHotkey v2 | AutoHotkey v1 |
| --- | --- |
|
ahk<br/>; Run Notepad, type "Hello world!"<br/>; and then select all text by mouse.<br/><br/>#Include "IbInputSimulator.ahk"<br/><br/>IbSendInit() ; IbSendInit("AnyDriver", 1)<br/><br/>Send("#r")<br/>WinWaitActive("ahk_class #32770")<br/>Send("notepad`n")<br/><br/>WinWaitActive("ahk_exe notepad.exe")<br/>Send("Hello world{!}")<br/>Sleep(100)<br/>MouseClickDrag("Left", 5, 5, 150, 50)<br/>|ahk<br/>; Run Notepad, type "Hello world!"<br/>; and then select all text by mouse.<br/><br/>#Include %A_ScriptDir%<br/>#Include IbInputSimulator.ahk<br/><br/>IbSendInit() ; IbSendInit("AnyDriver", 1)<br/><br/>Send #r<br/>WinWaitActive, ahk_class #32770<br/>Send notepad`n<br/><br/>WinWaitActive, ahk_exe notepad.exe<br/>Send Hello world{!}<br/>Sleep 100<br/>CoordMode, Mouse, Client<br/>MouseClickDrag, Left, 5, 5, 150, 50<br/>|
✨ 相关项目
-
GameMate: Macro Activator & Crosshair Timer
- GameMate 是一款强大的 Windows 应用程序,旨在提高你的工作效率和游戏体验。它允许你为不同的应用程序自定义按键绑定,为游戏添加准星覆盖层,阻止意外按键,高效跟踪时间,并自动执行复杂的操作序列。
-
IbLogiSoftExt: An extension for Logitech Gaming Software. Support sending G-keys to AutoHotkey.
📄 致谢
罗技相关
- @Eagle1020
- ekknod/logitech-cve,用于了解可以直接打开罗技设备
雷蛇相关
- Sadmeme/rzctl
- @任性,提供测试环境
赞助信息
| 日期 | 赞助者 | 备注 | | --- | --- | --- | | 2022-04-03 | 任性 | MouClassInputInjection | | 2023-04-22 | 任性 | 罗技 | | 2023-02-28 | - | | | 2021-08-28 | 任性 | 雷蛇 |
扫码联系在线客服