【发布时间】:2017-08-30 11:28:35
【问题描述】:
这是我的脚本。 Capslock 映射为长按发送左控制,否则发送转义。这按预期工作。
SetCapsLockState, alwaysoff
Capslock::
Send {LControl Down}
KeyWait, CapsLock
Send {LControl Up}
if ( A_PriorKey = "CapsLock" ){
Send {Esc}
}
return
; Send left control when long pressed, otherwise behave a normal enter key
Enter::
send {LControl Down}
KeyWait, Enter, T5
Send {LControl Up}
if ( A_PriorKey = "Enter" ){
Send {Enter}
}
return
但是Enter键没有等待长按,它很快就超时了。这不是我的期望。它的行为应该像上面的 sn-p
【问题讨论】:
-
您预计
Enter键的超时时间是多久?您为后者定义了 5 秒超时,但没有为前者定义。 -
我的期望是,它不应该像 Capslock 绑定那样超时。我尝试了 5 秒,但没有帮助。
标签: autohotkey