Reverse Behavior Of Shift Key

Get help with using AutoHotkey and its commands and hotkeys
connorwb93
Posts: 12
Joined: 19 Mar 2017, 22:34

Reverse Behavior Of Shift Key

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.

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

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.

Return to “Ask For Help”

Who is online

Users browsing this forum: edison, Hash817, mikeyww, unknownerrors, WeedTrek and 36 guests