Page 1 of 1

A_Priorkey is deleted

Posted: 22 Oct 2019, 14:33
by Rohwedder
Hallo,
here at the example of Japanese numerals:
Sending almost all Unicode characters deletes A_Priorkey!

Code: Select all

#InstallKeybdHook
SetTimer, PriorKey, 500
PriorKey:
ToolTip,% A_PriorKey?A_PriorKey:"A_PriorKey = empty"
Return
:*?:1::One
:*?:2::二
:*?X:3::SendInput, Three
:*?X:4::SendInput, 四
5::5
NumPad5::5
6::六
NumPad6::六

Re: A_Priorkey is deleted

Posted: 30 Sep 2022, 01:41
by Rohwedder
Regardless of the sleep time, after 20 "g "s send A_Priorkey is deleted:

Code: Select all

#InstallKeybdHook
$q Up::
Random, Time, 20, 200
While, A_PriorKey = "q"
{
	ToolTip,% A_Index
	SendInput, q
	Sleep, Time
}
Return

Re: A_Priorkey is deleted  Topic is solved

Posted: 30 Sep 2022, 17:27
by lexikos
Firstly, the original reported bug was fixed in v1.1.32.00.

The second issue is by design. Sending keys flushes the "prior key" event out of the key history.
The name of the last key which was pressed prior to the most recent key-press or key-release, or blank if no applicable key-press can be found in the key history.