Usage:
Delete: Ability 1/2
PgDown: Ability 3/4
Home: Ability 6/7
End: Reload(r)/Ability 8
Num5: [Multiplayer] Bind reload cancel to reload key.
Pause/Break: Enable Ability 1/2/3 reassignment.
The Num5 and Pause/Break hotkeys give an audible beep as to status of hotkey.
Three different tones indicate reassignment. One each with a higher pitch for each of the 3 hotkeys.
Adjust hotkey parameter 1 to adjust the key-down delay before using the second skill.
Code: Select all
#NoEnv
#SingleInstance force
#KeyHistory 0
#MaxHotkeysPerInterval 2000
#UseHook ON
SetTimer, Loop1, 250
ListLines Off
;critical
global HK0=1, HK1=2, HK2=3, RC="r", CS0="DOWN", CS1="LEFT" ;CustomKey
dllcall("psapi.dll\EmptyWorkingSet", "UInt", -1)
CheckStuck(Key,Slot) ; crude
{
if !GetKeyState(Key)
return
if !Slot && (Key != CS0) && GetKeyState(CS0)
{
Sendinput, {%CS0% UP}
CS0:=Key
SoundBeep, 1500, 50
}
else if Slot && (Key != CS1) && GetKeyState(CS1)
{
Sendinput, {%CS1% UP}
CS1:=Key
SoundBeep, 1500, 50
}
if GetKeyState(Key) && !GetKeyState(Key,"P")
{
Sendinput, {%Key% UP}
loop 3
SoundBeep, 1500, 100
}
}
Loop1:
CheckStuck("Up",0)
CheckStuck("Down",0)
CheckStuck("Left",1)
CheckStuck("Right",1)
return
MultiKey(Delay,Key1,Key2) ;fixed trailing Key1 after Key2
{
KeyWait, %A_ThisHotkey%, % "T" (Delay/1000)
if A_TimeSinceThisHotkey && !ErrorLevel
sendplay, % Key1
else while GetKeyState(A_ThisHotkey,"P")
{
sendplay, % Key2
sleep 100
}
}
return
Delete:: MultiKey(150,HK0,HK1)
PgDn:: MultiKey(150,HK2,"4")
Home:: MultiKey(500,"6","7")
End:: MultiKey(500,RC,"8")
Numpad5::
RC:=(RC=="r")?"7r":"r"
SoundBeep, % (RC=="r")?600:900, 500
return
Break:: ;CustomKey
SoundBeep, 500, 100
Input, HK0, L1
SoundBeep, 1000, 100
Input, HK1, L1
SoundBeep, 1250, 100
Input, HK2, L1
Loop 3
SoundBeep, 2000, 100
return