Code: Select all
; Below are lines to make wasd only activate on release of those keys, to prevent accidental rapid steps and missteps. I'm making wasd = wasd because I still want to be able to type in-game, rather than have them translate to numpad 8426.
w Up:: SendInput {w}
return
a Up:: SendInput {a}
return
s Up:: SendInput {s}
return
d Up:: SendInput {d}
return
; I noticed that I couldn't type wasd in uppercase with the script active unless I included the bit below.
+w Up:: SendInput {W}
return
+a Up:: SendInput {A}
return
+s Up:: SendInput {S}
return
+d Up:: SendInput {D}
return
; These are wasd combinations to create diagonals on the numpad. For example, w + a = Numpad 7 = Move Northwest. This feels buggy, as sometimes I will hit a diagonal combo, it will put out the correct numpad key, but will also include the latter wasd key after. For example, if I hit w & d, it will throw out a 9, but sometimes inputs d after as well. I also tried to use {___ up}{___ down} because documentation said this would prevent the hotkey from repeating when held, but that doesn't seem to be the case.
w & a:: SendInput {Numpad7 down}{Numpad7 up}
return
w & d:: SendInput {Numpad9 down}{Numpad9 up}
return
s & a:: SendInput {Numpad1 down}{Numpad1 up}
return
s & d:: SendInput {Numpad3 down}{Numpad3 up}
return
; Below are reversed duplicates because w & a:: as a command doesn't also imply a & w:: for some reason. Same issue as above.
a & w:: SendInput {Numpad7 down}{Numpad7 up}
return
d & w:: SendInput {Numpad9 down}{Numpad9 up}
return
a & s:: SendInput {Numpad1 down}{Numpad1 up}
return
d & s:: SendInput {Numpad3 down}{Numpad3 up}
return
; Below are lines for cancellations. For instance, w & s = nothing. It works, but has the same issue as above. So w & s will sometimes throw out an s, when it should be nothing.
w & s:: SendInput {null}
return
s & w:: SendInput {null}
return
a & d:: SendInput {null}
return
d & a:: SendInput {null}
return