Re: [AHK-] 想把up改成shift & up双重功能,可吗?

楼主: goman178 (goman)   2015-05-20 18:48:13
非常感谢你的帮忙!真的可以使用了
可是我还是遇到一些问题....
就是单纯用时间切好像还不够理想
比方说? or " ,我打shift+/ or shift+'的速度实在太快,<0.1sec
这时候up就不会被判断成shift了!(还蛮常发生的)
但缩短时间,又会造常短按up = up, 有时候不灵光
所以我想了新的flow:
up 长按 >0.1s, up = Rshift
up 短按 <0.1s
if up release时,没有按别的键, 则 up = up
if up release时, 已经又按下别的键,则 up = Rshift
这样又该如何写呢???
非常感谢你的帮忙喔 orz
※ 引述《eight0 (octō)》之铭言:
: ※ 引述《goman178 (goman)》之铭言:
: : 想把方向键的up键改成
: : 短按up = up
: : 持续按up = shift (toggle) , 作为modifier key
: : 要怎么写呢???
: ; 延迟时间
: timeout := 0.1
: ; 侦测 up 键
: *$up::
: ; 等待 up 在 %timeout% 秒之内被放开
: KeyWait, up, T%timeout%
: if (!ErrorLevel) {
: ; 如果被放开,表示是短按,送出 up
: Send {up}
: } else {
: ; 如果没被放开,表示是长按,送出 Shift down ... Shift up
: Send {Shift Down}
: KeyWait, up
: Send {Shift Up}
: }
: return
作者: eight0 (欸XD)   2015-05-21 19:28:00
Up 放开之前“/”就送出了,这时再送出 shift 已经来不及可以用 Up & /::Send +{/} 不过每个键都要写

Links booklink

Contact Us: admin [ a t ] ucptt.com