rigsta

u/rigsta




r/AutoHotkey•

I have a flight stick with a two-stage trigger. That means you pull the trigger halfway, you hear a click, and that's Joy1. You pull it further, you hear a second click, and that's Joy2. Or more accurately, Joy1 AND Joy2.

Due to a certain game expecting me to hold the trigger for ages at a time, I've been trying to make a script that "latches" (holds down) Joy1 when Joy2 is pressed, then releases Joy1 when Joy2 is pressed again.

I have never used AHKv2 before. Here's where I've gotten so far:

; Objective:  When Joy2 is pressed, hold Joy1.  When Joy2 is pressed again, release Joy1.

VarCounter := 0

2Joy2::
{
	global VarCounter
	if VarCou
33