How to bind 1 key to perform 2 key functions

Ask gaming related questions
TyroNickel
Posts: 4
Joined: 11 Jan 2019, 01:09

How to bind 1 key to perform 2 key functions

11 Jan 2019, 01:12

Can someone create a script for me that when I press spacebar it automatically presses W with it please and thank you and I need this for a game League of legends
Last edited by TyroNickel on 11 Jan 2019, 01:38, edited 1 time in total.
User avatar
gregster
Posts: 1988
Joined: 30 Sep 2013, 06:48

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 01:32

Welcome to the forum!

Here you go:

Code: Select all

Space::w
Please look at the beginner's tutorial. If this is for a game and not working, please look also here: https://www.autohotkey.com/boards/viewtopic.php?t=11084

Also, next time please post threads like this in the Ask for Help forum, or in its 'Gaming' subforum, if appropriate. Thank you!

Or did you mean Space and w?

Code: Select all

$Space::Send {Space}w
Hope this helps!
TyroNickel
Posts: 4
Joined: 11 Jan 2019, 01:09

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 01:40

umm so when i press space space and w press idk how to explain..
User avatar
gregster
Posts: 1988
Joined: 30 Sep 2013, 06:48

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 01:45

gregster wrote:
11 Jan 2019, 01:32

Code: Select all

$Space::Send {Space}w
This? When you press space, the space and the w key will be sent shortly after each other. Or both pressed down at the same time?

Code: Select all

$Space::Send {Space down}{w down}{w up}{Space up}
Last edited by gregster on 11 Jan 2019, 01:47, edited 1 time in total.
TyroNickel
Posts: 4
Joined: 11 Jan 2019, 01:09

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 01:47

Ill try it when i have my pc thank you
TyroNickel
Posts: 4
Joined: 11 Jan 2019, 01:09

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 02:10

a small delay would be okay milliseconds
User avatar
gregster
Posts: 1988
Joined: 30 Sep 2013, 06:48

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 02:56

Delay of what? You are not very precise in your requests...

Code: Select all

$Space::
Send {Space down}{w down}{w up}{Space up}
sleep, 100	; wait 100 milliseconds
return
?
I think you should now try a little bit yourself, with the info from here and the tutorial.
If you have further questions/problems, please show the code you have tried and describe exactly what doesn't work as expected...
mast4rwang
Posts: 140
Joined: 19 Jul 2017, 09:59

Re: How to bind 1 key to perform 2 key functions

11 Jan 2019, 09:34

~*Space::w
return

~ symbol means the button retains its original function and sends your commands.
* symbol means you can press other buttons while pressing yours and it will still work.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 21 guests