Press button again on release?

Post Reply
Krickis
Posts: 4
Joined: 18 Apr 2023, 01:16

Press button again on release?

Post by Krickis »

Hello, I am new to Xpadder and trying to figure out how I can make a button press twice — once on pressing down the button, and a second time on releasing it. Specifically, I'm playing the first Call of Duty where right-click aims down the sights of the gun, but the game has it where that's a toggle, not a hold, in that you right-click to go into aiming mode and then have to right-click again to out of aiming mode. So I mapped it to left trigger, and it works just like the mouse button (I have to press the trigger again to exit aiming mode). If I could program Xpadder in such a way that on pressing the left trigger down it would right click once, and then on releasing the trigger it would right click again, I think this would do what I want of having it aim while holding down the trigger and then stop aiming when I let go of the trigger.

Sorry if this is answered elsewhere, but I looked around and didn't see anything. Thanks in advance for any help!

Krickis
Posts: 4
Joined: 18 Apr 2023, 01:16

Re: Press button again on release?

Post by Krickis »

Ah, I'm dumb. There's an option in the Call of Duty controls to change it from a toggle to a hold. Wouldn't mind knowing how to do this in Xpadder for future reference, but it's no longer a pressing consideration lol

Jonathan
Xpadder creator
Posts: 1738
Joined: 24 Aug 2009, 11:33
Location: England
Contact:

Re: Press button again on release?

Post by Jonathan »

Have a look at Hold Zone and Release Zone here:
viewtopic.php?f=7&t=3714

This example will tap X once when you squeeze the trigger then tap Y when you fully release the trigger:

HoldZone (0.01s)
X
Pause(0.10s)
ReleaseZone (0.01s)
Y

The Pause(0.10s) after the X is used to turn the hold assignment from a constant "hold X down" to a sequence which runs only once (X is simply tapped)
This prevents X from constantly repeating while the trigger is held. Remove the pause to emulate pressing X constantly

Jonathan
Xpadder creator
Posts: 1738
Joined: 24 Aug 2009, 11:33
Location: England
Contact:

Re: Press button again on release?

Post by Jonathan »

Have a look at Hold Zone and Release Zone here:
viewtopic.php?f=7&t=3714

This example will tap X once when you squeeze the trigger then tap Y when you fully release the trigger:

HoldZone (0.01s)
X
Pause(0.10s)
ReleaseZone (0.01s)
Y

The Pause(0.10s) after the X is used to turn the hold assignment from a constant "hold X down" to a sequence which runs only once (X is simply tapped)
This prevents X from constantly repeating while the trigger is held. Remove the pause to emulate pressing X constantly

Post Reply

Return to “How do I do this assignment? Keyboard actions”