Reverse Behavior Of Shift Key

Get help with using AutoHotkey and its commands and hotkeys
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
		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.

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, Bing [Bot], daywalker, keylo, songdg, TAC109, vanil, zvit and 53 guests