How to treat a single button as a combination of buttons? Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Rauvagol
Posts: 14
Joined: 25 Apr 2017, 00:30

How to treat a single button as a combination of buttons?

25 Apr 2017, 00:42

Not sure if the title is the best way to phrase it, but basically, while the active window is "WARFRAME" I want to make XButton1(pressed) hold down the ctrl and "e" keys, and when it is released, to release those keys. (so I can control how long the buttons are pressed)

I currently have

#IfWinActive WARFRAME
XButton1::
Send, {LControl Down}{e}{LControl Up}
Return

but I would like it to work more like (warning:pseudocode inbound)

#IfWinActive WARFRAME
XButton1(down)::
Send, {hold LControl Down}{hold e down}
XButton1(up)::
Send, {e up}{LControl Up}
Return
malone

Re: How to treat a single button as a combination of buttons?

25 Apr 2017, 02:57

The notes on how keys are remapped cover everything you want, I think. Just copy that but send 2 keys instead of 1

https://autohotkey.com/docs/misc/Remap.htm#Remarks
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: How to treat a single button as a combination of buttons?  Topic is solved

25 Apr 2017, 05:18

That pseudo code is verry nice. Gives a clear idea of what you want.
This is the conversion to real code:

Code: Select all

#IfWinActive WARFRAME
XButton1::
	Send, {LControl Down}{e down}
	Return
XButton1 up::
	Send, {e up}{LControl Up}
	Return
	
#IfWinActive
Let me know how it works.
Rauvagol
Posts: 14
Joined: 25 Apr 2017, 00:30

Re: How to treat a single button as a combination of buttons?

25 Apr 2017, 18:57

well that's straightforward enough, thanks :D

edit: doesnt seem to be working, it looks like the {e} command is releasing the control key being held down

second edit: it totally works, I was wrong

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 131 guests