Modifier key to block keyboard input? + multiple key combinations for hotkey

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rokkyboy
Posts: 16
Joined: 01 Sep 2017, 07:04

Modifier key to block keyboard input? + multiple key combinations for hotkey

02 Sep 2017, 08:34

Hello,

I was looking at chording and was curious if there is a way to press a modifier key that will block keyboard input, and allow key combinations to execute any script upon the release of that modifier key.

For example,

1. holding down Capslock will block any additional key presses as an input (so if your cursor was in notepad, pressing any keys with capslock down will not input anything to the notepad)
2. Any following key presses (more than one) can be mapped to a script

so that something like:

Code: Select all

Capslock + npd::
{
Run Notepad
}
so when we let Capslock go, it will open notepad.

If anyone knows other posts that dealt with this issue, your guidance would also be much appreciated :)

Thanks,

Rok
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: Modifier key to block keyboard input? + multiple key combinations for hotkey

02 Sep 2017, 08:48

Try this, so pressing Capslock+n will open notepad:

Code: Select all

CapsLock::
	Input,v
Return
CapsLock Up::
	Input
	if (A_PriorKey="n")
		Run Notepad
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 329 guests