Page 1 of 1

Reverse Behavior Of Shift Key

Posted: 24 Apr 2017, 01:16
by connorwb93
This feels like it should be easy.
I want to reverse the behavior of the shift key. While it is pressed down, the system should think it is not engaged. When released, the system should think it is engaged.

Here's my attempt. I'm not sure if the * vs the $ prefix matters here? Neither seem to work.

Code: Select all

; set local var
	ShiftReverseOn := 0
; button to set shift to reverse
		if (ShiftReverseOn = 1) {
			ShiftReverseOn := 0
			send {LShift Up}
		} else {
			ShiftReverseOn := 1
			send {LShift Down}
		msgbox % "toggled, now = " ShiftReverseOn

; actual hotkey - shiftdown should disengage shift, shiftup should engage it
#If (ShiftReverseOn = 1)
		;traytip, , shiftup, 2
		Send {Shift Up}
	$LShift Up::
		;traytip, , shiftdown, 2
		Send {Shift Down}

If anyone is curious, Lucio in Overwatch can set to heal mode by default and switch to speed when shift is pressed. I would like to reverse that.