I need a hotkey that makes the alt key toggle the Lshift and Lctrl Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: I need a hotkey that makes the alt key toggle the Lshift and Lctrl

09 Jun 2018, 19:26

Code: Select all

*Alt::Send % (toggle := !toggle) ? "{Shift Down}{Ctrl Down}" : "{Shift Up}{Ctrl Up}"
HTH
Diche_Bach
Posts: 4
Joined: 14 Aug 2017, 15:12

Re: I need a hotkey that makes the alt key toggle the Lshift and Lctrl

18 Jun 2018, 11:57

So if I want the app to "hold down" the "w" key persistently, would this work?

-----code-----
*^!w::Send % (toggle := !toggle) ? "{W Down}" : "{W Up}" ; Ctrl+Alt+W toggles the W state between down and up
----end code-----

runs without errors, but it doesn't spew out a string of W letters on my note pad like I expected. Want to use it with Empyrion Galactic Survival so I don't have to hold down "W" to move forward! :)
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: I need a hotkey that makes the alt key toggle the Lshift and Lctrl

18 Jun 2018, 12:19

Diche_Bach wrote:So if I want the app to "hold down" the "w" key persistently, would this work?

-----code-----
*^!w::Send % (toggle := !toggle) ? "{W Down}" : "{W Up}" ; Ctrl+Alt+W toggles the W state between down and up
----end code-----

runs without errors, but it doesn't spew out a string of W letters on my note pad like I expected. Want to use it with Empyrion Galactic Survival so I don't have to hold down "W" to move forward! :)

Code: Select all

#NoEnv

*^!$w::SetTimer, SpamKey, % (toggle := !toggle) ? 50 : "Off"    ; Change 50 to increase or decrease insterval speed

SpamKey:
    Send, w
return
Diche_Bach
Posts: 4
Joined: 14 Aug 2017, 15:12

Re: I need a hotkey that makes the alt key toggle the Lshift and Lctrl

18 Jun 2018, 12:25

Whoo hoo! Works!

Also, assigned the in-game "Primary Action" hotkey (e.g., shooting a firearm or a mining laser) to "/" and then used:

------end code------
*^/::Send % (toggle := !toggle) ? "{/ Down}" : "{/ Up}"
------end code------

So I don't have to hold down my left mouse button for long periods of mining!
Diche_Bach
Posts: 4
Joined: 14 Aug 2017, 15:12

Re: I need a hotkey that makes the alt key toggle the Lshift and Lctrl

18 Jun 2018, 12:26

Xtra wrote:
Diche_Bach wrote:So if I want the app to "hold down" the "w" key persistently, would this work?

-----code-----
*^!w::Send % (toggle := !toggle) ? "{W Down}" : "{W Up}" ; Ctrl+Alt+W toggles the W state between down and up
----end code-----

runs without errors, but it doesn't spew out a string of W letters on my note pad like I expected. Want to use it with Empyrion Galactic Survival so I don't have to hold down "W" to move forward! :)

Code: Select all

#NoEnv

*^!$w::SetTimer, SpamKey, % (toggle := !toggle) ? 50 : "Off"    ; Change 50 to increase or decrease insterval speed

SpamKey:
    Send, w
return
Ah thanks Xtra. Actually though the previous one works in game.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CoffeeChaton, labrint, whoops and 126 guests