Make the Ctrl to a multi button Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fona
Posts: 65
Joined: 07 Apr 2022, 06:43

Make the Ctrl to a multi button

Post by fona » 26 May 2022, 14:11

Hi everyone,
Ctrl is a modifier and, therefore, always held down by pressing another button. So, I thought Ctrl could have been an useful multi button (single click and hold key). Let's say if I press it down and hold, it sends a normal Ctrl. If I press Ctrl and releases immidately it does something else.

Code: Select all

*Lctrl::
		KeyWait, Lctrl, T0.20
		if (ErrorLevel = 1){ ; Button is still down
		SendInput {Lctrl down}
		Keywait, Lctrl
		SendInput {Lctrl up}
		}
			else{
		SendInput, ^c ;copies selected text
		}
	return
I tried different ways to do that but nothing works for me

User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Make the Ctrl to a multi button  Topic is solved

Post by mikeyww » 26 May 2022, 14:54

Code: Select all

~LCtrl Up::
If (A_PriorKey != "LControl")
 Return
Send xyz
Return

fona
Posts: 65
Joined: 07 Apr 2022, 06:43

Re: Make the Ctrl to a multi button

Post by fona » 26 May 2022, 17:20

mikeyww wrote:
26 May 2022, 14:54

Code: Select all

~LCtrl Up::
If (A_PriorKey != "LControl")
 Return
Send xyz
Return
As always, thank you my friend.

Post Reply

Return to “Ask for Help (v1)”