▲ 2 r/AutoHotkey
Issues Swapping Keys for Video Games that won't let you change control layout.
#Requires AutoHotkey v2.0
#HotIf WinActive("ahk_exe Everything is Crab.exe") || WinActive("ahk_exe VampireSurvivors.exe")
q::a
a::q
e::d
d::e
#HotIf
I have been using the above script to swap Q and A and E and D to use QWES instead of WASD for movement in a couple video games. But sometimes it will randomly get stuck holding down Q or E and won't stop until I press that key again presumably to cause the key up to finally be recognized.
I tried some googling to solve or at least identify the problem but I'm at a loss. It works 98% of the time, but the times it does mess up and causes me to run into enemies can be run ending.
If any AHK wizards could help me with an improved script that won't continue sending a Q or E. I'm also super eager to learn so if someone feels inclined to explain why it's happening I'm all ears!
u/FierceBruunhilda — 14 hours ago