Reverse Behavior Of Shift Key
Posted: 24 Apr 2017, 01:16
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.
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.
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
^!+s::
if (ShiftReverseOn = 1) {
ShiftReverseOn := 0
send {LShift Up}
} else {
ShiftReverseOn := 1
send {LShift Down}
}
msgbox % "toggled, now = " ShiftReverseOn
return
; actual hotkey - shiftdown should disengage shift, shiftup should engage it
#If (ShiftReverseOn = 1)
$LShift::
;traytip, , shiftup, 2
Send {Shift Up}
return
$LShift Up::
;traytip, , shiftdown, 2
Send {Shift Down}
return
#If