Sendlevel and modifier key problem... Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tabr3
Posts: 16
Joined: 25 Feb 2024, 04:06

Sendlevel and modifier key problem...

30 Apr 2024, 02:36

Press w will return "sd" , which is correct. Pressing a or shift key alone also output correctly.

Same code from w
But pressing q will return Shift + s + d , "SD" which is incorrect . Shift should not be there. Also, if you hold down "q" for long enough, q will somehow breaks through and they will all stay at the key down state even released q , which is Shift + s + d + q + ???...

Every time dealing with modifier key is pain :facepalm:

Code: Select all

a::send {s down}{d down}
a up::send {s up}{d up}

shift::send {s down}{d down}
shift up::send {s up}{d up}

w:: ; hotkey 1
sendlevel , 1
send {a down}
return
w up::
sendlevel, 1
send {a up}
return

q:: ;hotkey 2
sendlevel , 1
send {shift down}
return
q up::
sendlevel, 1
send {shift up}
return
Rohwedder
Posts: 7706
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Sendlevel and modifier key problem...  Topic is solved

30 Apr 2024, 07:07

Hallo,
try:

Code: Select all

a::send {s down}{d down}
a up::send {s up}{d up}
shift::send {s down}{d down}
shift up::send {s up}{d up}
#InputLevel 1
w::send {a down} ; hotkey 1
w up::send {a up}
q::shift ;hotkey 2 
#InputLevel 0
tabr3
Posts: 16
Joined: 25 Feb 2024, 04:06

Re: Sendlevel and modifier key problem...

30 Apr 2024, 07:27

that is much better , thk

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: koolestani, pilgrimlyieu, Rohwedder and 109 guests