Hotkey Interference
Posted: 27 Mar 2024, 01:45
Hi! I'm new to AHK. I have a script for The Long Dark game which includes 2 hotkeys E and R. E is to toggle the sprint and R is to toggle the radial menu. But when I press them together, they interfere with each other and I have to press them twice to activate each one. Is there a way to disable R when I press E and vice versa to prevent double pressing? Thanks a lot. Also, these are the scripts that I use:
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
[Mod action: Moved topic from “Ask for Help (v2)” because this is v1 code and it is for a game. Please note the sub-forum to which your post has been moved, and post in the appropriate place next time.]
Code: Select all
e::
KeyDown := !KeyDown
SendInput {lshift}
Sleep, 30
If KeyDown
SendInput {lshift down}
Else
SendInput {lshift up}
Return
r::
KeyDown := !KeyDown
SendInput {tab}
Sleep, 30
If KeyDown
SendInput {tab down}
Else
SendInput {tab up}
Return
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
[Mod action: Moved topic from “Ask for Help (v2)” because this is v1 code and it is for a game. Please note the sub-forum to which your post has been moved, and post in the appropriate place next time.]