我想将鼠标向上和鼠标向下重新映射到键盘键,但仅在使用某个应用程序时。这是我走了多远:
_WinWaitActivate("League of Legends (TM) Client", "")
HotKeySet("{K}", "WinTab")
ProcessWait("")
Func WinTab()
Send("G")
EndFunc
#region --- Internal functions Au3Recorder Start ---
Func _WinWaitActivate($title, $text, $timeout=0)
WinWait($title, $text, $timeout)
If Not WinActive($title, $text) Then WinActivate($title, $text)
WinWaitActive($title, $text, $timeout)
EndFunc
#endregion --- Internal functions Au3Recorder End ---
这将重新映射K到G. 也可以重新映射鼠标滚轮,但我找不到合适的键绑定。例如,如果Esc按下或Alt+ ,我还想暂停重新映射。Tab