我正在尝试使用Send命令发送压缩修改器,只有我想出的方法是将它们全部列出:
; (Note: I've remapped using registry the Capslock as F13)
F13 & h::
if GetKeyState("Control") && GetKeyState("Shift") {
Send +^{Left}
return
}
if GetKeyState("Control") {
Send ^{Left}
return
}
if GetKeyState("Shift") {
Send +{Left}
return
}
Send {Left}
return
Run Code Online (Sandbox Code Playgroud)
在Windows中如果你按ctrl + left它会向左跳一个单词,如果按ctrl + shift + left它会向左选择一个单词.类似地,我想像上面的例子一样发送现有的修饰符,但是有更简单的方法吗?伪代码:F13 & h::Send {CurrentlyPressedModifiers}{Left}
您可以使用Send,{Blind}模式执行此操作.例:
*a::Send, {Blind}{Left}
Run Code Online (Sandbox Code Playgroud)
在*接受所有改性剂a和{盲}传递到修饰符Send命令.
或者,您可以避免发送和使用:
a::Left
Run Code Online (Sandbox Code Playgroud)
这里所有修饰符都自动传递给Left命令.
因此,除非您将组合键更改回标准热键,否则您的初始解决方案可能是唯一的解决方案.