(v2) Adding extra “up”? (up up::) Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
robinson
Posts: 189
Joined: 12 Sep 2019, 20:28

(v2) Adding extra “up”? (up up::)

11 Mar 2020, 12:46

LAlt up::a

The above line (line 127) causes this error when I run it:

Error at line 127.
Line Text: *LAlt up up::
Error: Invalid hotkey.

I'm just a noob. Am I missing something here?
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: (v2) Adding extra “up”? (up up::)

11 Mar 2020, 12:56

This is documented, please see remapping, remarks.

Cheers.
robinson
Posts: 189
Joined: 12 Sep 2019, 20:28

Re: (v2) Adding extra “up”? (up up::)

19 Mar 2020, 11:31

@Helgef

Would you mind telling me which part of that page
references why LAlt up::a would appear as *LAlt up up:: ?
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: (v2) Adding extra “up”? (up up::)  Topic is solved

19 Mar 2020, 13:01

When a script is launched, each remapping is translated into a pair of hotkeys. For example, a script containing a::b actually contains the following two hotkeys instead:

Code: Select all

*a::
SetKeyDelay -1   ; If the destination key is a mouse button, SetMouseDelay is used instead.
Send "{Blind}{b DownR}"  ; DownR is like Down except that other Send functions in the script won't assume "b" should stay down during their Send.
return

*a up::
SetKeyDelay -1  ; See note below for why press-duration is not specified with either of these SetKeyDelays.
Send "{Blind}{b Up}"
return
which means that LAlt up::a is translated to

Code: Select all

*LAlt up::
SetKeyDelay -1   ; If the destination key is a mouse button, SetMouseDelay is used instead.
Send "{Blind}{a DownR}"  ; DownR is like Down except that other Send functions in the script won't assume "b" should stay down during their Send.
return

*LAlt up up::
SetKeyDelay -1  ; See note below for why press-duration is not specified with either of these SetKeyDelays.
Send "{Blind}{a Up}"
return
Perhaps you want this instead: Lalt up::send 'a'.

Cheers.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: songdg and 63 guests