Trying to change the toggle sprint key (LSHIFT) from a toggle into a hold button in Fallout 4.
This is what I have so far but it is not working in game at all. After leaving game my LShift does not work at all until after reboot.
Any help would be appreciated…
lshift_held := 0
$*LShift::
if (lshift_held)
return ; Filter repeats
lshift_held := 1
Send {Blind}{LShift}
return
$*LShift up::
lshift_held := 0
Send {Blind}{LShift}
return
Toggle into a hold.
-
- Posts: 1
- Joined: 24 Feb 2018, 17:40
Re: Toggle into a hold.
Okay if I understood you correctly, you want shift to hold when you click it once, and stop holding when you click it again? I didn't understand why you have the first return in:
Was that a mistake?
Anyways:-
Code: Select all
lshift_held := 0
$*LShift::
if (lshift_held)
return; Filter repeats
lshift_held := 1
Send {Blind}{LShift}
return
Anyways:-
Code: Select all
Toggle := 0
$*LShift::
Toggle := !Toggle
if Toggle
Send {Lshift down}
Else
Send {Lshift up}
return
esc:: ExitApp ; presa esc to stop script
I am your average ahk newbie. Just.. a tat more cute.
Re: Toggle into a hold.
A couple of things to test, try without the blind statements, and also use a different hotkey (or alter the games key bind). I've had similar experiences in other games, where when the key being sent, and also the hotkey being used are the same key, it doesn't work (but will in normal apps). Changing one of them to something else like RShift (instead of LShift) usually fixes it. Point being sometimes games can see through ahk's attempts to block a key, if that same key is also used for some action within the game.
Who is online
Users browsing this forum: No registered users and 57 guests