Created
October 19, 2024 23:24
-
-
Save Waester/3807fbe299a1e8bdfc9225c4fd834289 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires AutoHotkey v2 | |
#SingleInstance | |
ListLines(0), KeyHistory(0) | |
ProcessSetPriority("High") | |
for k, v in Map("a","d","w","s") | |
Set(k, v, 0), Set(v, k, 0), Set(k, v, 1), Set(v, k, 1) | |
Set(a, b, up) { | |
if up | |
return Hotkey("*" a " Up", ( | |
(a, b, *) => ( | |
Hotkey("*" a, "On"), SendInput("{Blind}{" (GetKeyState(b, "P") and !GetKeyState(b) ? a " up}{" b " down}" : a " up}" )) | |
) | |
).Bind(a, b) | |
) | |
Hotkey("*" a, ( | |
(a, b, *) => ( | |
Hotkey("*" a, "Off"), SendInput("{Blind}{" (GetKeyState(b) ? b " up}{" a " down}" : a " down}" )) | |
) | |
).Bind(a, b) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment