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

作者: eight0 (欸XD)   2015-05-19 11:12:31
※ 引述《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

Links booklink

Contact Us: admin [ a t ] ucptt.com