[solved] Bind a single key to multiple keys

Ask gaming related questions (AHK v1.1 and older)
Jinxer
Posts: 15
Joined: 02 Sep 2015, 15:43

[solved] Bind a single key to multiple keys

07 Sep 2015, 19:28

I want to bind (keyword is Bind) the "p" key to itself and the up arrow. So something like
p:: p&up
or
p::p
p::up

However, both of these examples of code are invalid. (If one cannot bind a key to itself I can work around that. So for example it would be sufficient to get it so pressing "w" pressed both "p" and the up arrow).

Doing anything with the "send" function does not seem to work, because it is not actually a bind and using send command leads to issues. I actually need it to be bound. Hence doing something like
w:: send, p{up}
or
w:: send, p{up down}{sleep, 10}{up up}
does not work.

Background info (in case it helps);
This is from the game ME2. I am left handed so the "p" key is my move-forward (don't judge me). And whoever ported this game to pc was a moron and made the menu options be navigated by the arrow keys (there is no way to rebind them in the game). Hence instead of having to move my hand every time I want to navigate certain parts of the menu I want to bind the "p" key to both be "p" and "up" (I will do the same with other keys as well).

Any advice? Much thanks
Last edited by Jinxer on 08 Sep 2015, 13:53, edited 1 time in total.
Noesis
Posts: 301
Joined: 26 Apr 2014, 07:57

Re: Bind a single key to multiple keys

08 Sep 2015, 00:37

Try not blocking the key i.e.:
~p:: Up
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Bind a single key to multiple keys

08 Sep 2015, 10:24

Code: Select all

; This version blocks the original press of p, and sends a new one, then up
$p::
   Send {p}{Up}
   return
or

Code: Select all

; This version lets the original press of p through, and sends up afterwards
~p::Up
Jinxer
Posts: 15
Joined: 02 Sep 2015, 15:43

Re: Bind a single key to multiple keys

08 Sep 2015, 13:52

That did it. Thanks Noesis

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 20 guests