Generated key up for unknown reason, and missed key presses Topic is solved

Report problems with documented functionality
Vanav
Posts: 1
Joined: 11 Feb 2024, 13:36
Contact:

Generated key up for unknown reason, and missed key presses

11 Feb 2024, 17:21

In the following conditions an extra key up is generated for unknown reason, and key press is missed.
1.Run script A (to disable windows menu on single Alt key press):

Code: Select all

A_MenuMaskKey := ""
~LAlt:: {
    Send "{Blind}{vkE8}"
}
2. Run script B:

Code: Select all

A_MenuMaskKey := ""
#^l:: {
}
3. Press Alt key multiple times. Sometimes all is expected:

Code: Select all

VK  SC	Type	Up/Dn	Elapsed	Key		Window
------------------------------------------------------------------
A4  038	h	d	0.25	LAlt           	
E8  000	i	d	0.00	not found      	
E8  000	i	u	0.00	not found      	
A4  038	 	u	0.12	LAlt           	
4. But some Alt presses are missed:

Code: Select all

VK  SC	Type	Up/Dn	Elapsed	Key		Window
------------------------------------------------------------------
A4  038	h	d	0.26	LAlt           	
A4  038	i	u	0.02	LAlt           	<---- who is generating this?
E8  000	i	d	0.00	not found      	
E8  000	i	u	0.00	not found      	
A4  038	 	u	0.11	LAlt
An extra i u LAlt is generated early for unknown reason.

Environment: Windows 11, AutoHotkey v2.0.11, all scripts run with UIA access.
Important requirements:
1. Hotkey in script B must be already registered. In this example it is Win-Ctrl-L, that is registered by Windows to capture video. It can be any another registered, say, Win-Alt-K, that is registered by Windows to mute microphone in Teams.
2. Scripts A and B but be separate processes.
3. Script B must be run after script A.

I've tried A_MenuMaskKey := "" (documentation), but seems no difference.

How this extra key up is generated?
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: Generated key up for unknown reason, and missed key presses  Topic is solved

22 Mar 2024, 20:00

This should be fixed by v2.0.12.
Fixed Send erroneously releasing a modifier due to a race condition. For example, ~LAlt::Send "{Blind}x" intermittently released LAlt if some other keyboard hook was installed more recently than the script's own hook.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 48 guests