|
|
@ -4,19 +4,28 @@ |
|
|
|
|
|
|
|
_HoldRepeat_TurboOn := Map() |
|
|
|
|
|
|
|
Hold(Primary, Secondary:=[],Tertiary:=[]) { |
|
|
|
Send "{Blind}{" Primary " down}" |
|
|
|
SetTimer HoldLoop.Bind(Primary,Secondary,Tertiary), 50 |
|
|
|
_GetPrefix(SendBlind) { |
|
|
|
if (SendBlind) { |
|
|
|
return "{Blind}" |
|
|
|
} else { |
|
|
|
return "" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Hold(Primary, Secondary:=[],Tertiary:=[],SendBlind:=true) { |
|
|
|
Prefix := _GetPrefix(SendBlind) |
|
|
|
Send Prefix "{" Primary " down}" |
|
|
|
SetTimer HoldLoop.Bind(Primary,Secondary,Tertiary,Prefix), 50 |
|
|
|
} |
|
|
|
|
|
|
|
HoldLoop(Primary, Secondary, Tertiary) { |
|
|
|
HoldLoop(Primary, Secondary, Tertiary,Prefix) { |
|
|
|
if GetKeyState(Primary,"P") { |
|
|
|
SetTimer , 0 |
|
|
|
return |
|
|
|
} |
|
|
|
for index,key in Secondary { |
|
|
|
if GetKeyState(key,"P") { |
|
|
|
Send "{Blind}{" Primary " up}" |
|
|
|
Send Prefix "{" Primary " up}" |
|
|
|
SetTimer , 0 |
|
|
|
return |
|
|
|
} |
|
|
@ -29,14 +38,15 @@ HoldLoop(Primary, Secondary, Tertiary) { |
|
|
|
} |
|
|
|
} |
|
|
|
if (!keyHeld) { |
|
|
|
Send "{Blind}{" Primary " up}" |
|
|
|
Send Prefix "{" Primary " up}" |
|
|
|
SetTimer , 0 |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Repeat(Primary, Secondary) { |
|
|
|
Send "{Blind}{" Primary " up}" |
|
|
|
Repeat(Primary, Secondary,SendBlind:=true) { |
|
|
|
Prefix := _GetPrefix(SendBlind) |
|
|
|
Send Prefix "{" Primary " up}" |
|
|
|
Sleep 100 |
|
|
|
RepeatVar := 0 |
|
|
|
Loop { |
|
|
@ -49,10 +59,10 @@ Repeat(Primary, Secondary) { |
|
|
|
} |
|
|
|
} |
|
|
|
if (RepeatVar == 1) { |
|
|
|
Send "{Blind}{" Primary " down}" |
|
|
|
Send Prefix "{" Primary " down}" |
|
|
|
RepeatVar := 0 |
|
|
|
} else { |
|
|
|
Send "{Blind}{" Primary " down}" |
|
|
|
Send Prefix "{" Primary " down}" |
|
|
|
RepeatVar := 1 |
|
|
|
} |
|
|
|
Sleep 100 |
|
|
@ -60,12 +70,12 @@ Repeat(Primary, Secondary) { |
|
|
|
} |
|
|
|
|
|
|
|
; Sets key to hold if single tap, or repeat if double tap |
|
|
|
HoldOrRepeat(Primary, Secondary) { |
|
|
|
Send "{Blind}{" Primary " down}" |
|
|
|
HoldOrRepeat(Primary, Secondary,SendBlind:=True) { |
|
|
|
Send _GetPrefix(SendBlind) "{" Primary " down}" |
|
|
|
if KeyWait(Primary, "D T0.2") { |
|
|
|
Repeat(Primary,Secondary) |
|
|
|
Repeat(Primary,Secondary,SendBlind) |
|
|
|
} else { |
|
|
|
Hold(Primary,Secondary) |
|
|
|
Hold(Primary,Secondary,,SendBlind) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|