0
votes

I'm playing a game that requires you to hold down the control button to jump. What I wanna do is make it so that the XButton1 (Mouse Button 4) holds down the Control, then when I release XButton1, Control also releases.

It's odd because the XButton2 (Mouse Button 5) works, but XButton1 doesn't. The XButton1 is the 'back' button on my mouse, and that function works.

If I use this code: XButton:: Send {Lctrl Down}, that works, but the Control doesn't release until I click the Left Control again.

Does anyone know what I can do to make this work?

-Edit-

I just tried the following code: XButton1::Soundbeep and it worked, which is weird. But assigning the Control to it doesn't, but assigning it to XButton2 does.

1

1 Answers

0
votes

Especially for modifier keys, you need to address both Up and Down as follows:

XButton1::Send {LCtrl Down}
XButton1 Up::Send {LCtrl Up}

Edit:
If the above doesn't work on that particular game, try:

XButton1::SendInput {LCtrl Down}
XButton1 Up::SendInput {LCtrl Up}

or

XButton1::SendPlay {LCtrl Down}
XButton1 Up::SendPlay {LCtrl Up}