Toggle Rebound key

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 08 Nov 2019, 13:35

Toggle Rebound key

08 Nov 2019, 13:52

Hi, literal first time using AHK. How would I go about binding a hotkey to activate and deactivate the following:

Code: Select all

So if I press the hotkey, LButton is remapped to LAlt and if I press the hotkey again, LButton goes back to LButton.

User avatar
Posts: 1391
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Toggle Rebound key

08 Nov 2019, 14:00

Code: Select all

#SingleInstance, Force

Toggle := 0 ; Initialize variable

F12:: ;<-- F12 Hotkey
	Toggle := !Toggle ; Toggle variable to 1 or 0

#If (Toggle) ; If Toggle variable = 1
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.

Return to “Ask For Help”

Who is online

Users browsing this forum: barbaque, Bing [Bot], colt, Getfree, kdservices and 171 guests