A_Priorkey is deleted Topic is solved

Report problems with documented functionality
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

A_Priorkey is deleted

Post by Rohwedder » 22 Oct 2019, 14:33

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::六

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: A_Priorkey is deleted

Post by Rohwedder » 30 Sep 2022, 01:41

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

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: A_Priorkey is deleted  Topic is solved

Post by lexikos » 30 Sep 2022, 17:27

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.

Post Reply

Return to “Bug Reports”