Emulated key as Hotkey for other functions

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
M_L
Posts: 13
Joined: 21 Mar 2016, 06:54

Emulated key as Hotkey for other functions

24 Apr 2017, 02:51

Hello @all,

I mapped capslock to ctrl and have some scripts that are triggered with a Ctrl+*SomeCharacterKey* Combination.
Sadly the emulated ctrl key does not trigger those functions, while the real ctrl key still does.
What can I do that the emulated ctrl key also triggers those functions?


Capslock to Ctrl Code:

Code: Select all

*Capslock:: 
   SendInput {LCtrl Down}
   KeyWait, Capslock ; wait until the Capslock button is released   
   ;If GetKeyState("CapsLock", "T") = 1 ;Ref > https://autohotkey.com/board/topic/88211-toggle-capslock/
	;	SetCapsLockState, off
   SendInput {LCtrl Up}   
Return 
Some Function triggered by Ctrl+*SomeCharacterKey* Combination

Code: Select all

;------------------------Opening Bookmarks-bar to delete or save tab / URL-------------------------------------------------
^d::
	KeyWait, d, T0.4                             	 ; Wait no more than 0.5 sec for key release (also suppress auto-repeat)
    If ErrorLevel   								; Delete function
	{
		Send ^d
		Sleep 200
		Send {Tab}
		Sleep 200
		Send {Tab}
		Sleep 200
		Send {Enter} 								;Delete Bookmark
	}else{
		Send +!d  ;Open bookmark extension 
	}
	while (GetKeyState("d", "P")){
		Sleep 3000
	}
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: alawsareps, mebelantikjaya, mikeyww, RussF and 300 guests