Page 1 of 1

Using a modifier as a normal key and then as modifier

Posted: 17 Jun 2019, 13:03
by Five One
Novice on AHK here. Here are the lines:

^Alt:: Send, b

^!PGDN:: Send, r

The "^!" part of the second line gets send continuously before PGDN is pressed, and I get something like "bbbr", so I have tryed:

Alt & AppsKey: return

^!PGDN:: Send, r

^Alt Up:: Send, b

Now ^!PGN:: works normaly, but when ^Alt Up is released, it fires, so I get "rb". To clarify, I want just r, or just b, not a bundle. Also, I plan to use other combinations of the type, with one line consisting of two modifiers and the other consisting of the same two modifiers and a normal key, so the solution cannot prevent further assemblances such as this one.

Re: Using a modifier as a normal key and then as modifier  Topic is solved

Posted: 18 Jun 2019, 01:10
by Rohwedder
Hallo,
try:

Code: Select all

~^Alt Up::
	IF A_PriorHotkey <> ^!PgDn
		Send, b
Return
^!PgDn::Send, r
But!
Using a modifier as a normal key and then as modifier
is shit!
Use modifier keys, mouse buttons and wheel only in combination with other keys as hotkeys.