" Up::" seems to not work properly in 2.0.7
Posted: 03 Nov 2023, 14:56
I wrote the following code:
Nothing fancy, I mapped F20 to one special button in my Logitech mouse using its firmware and then mapped it to left control and right mouse button combo when Firefox is active, so Snap Links add-on can be activated using one button. The "f20_down" global variable is there to suppress context menu popping up when I release the button.
It works as it should in AutoHotkey 2.0.6, but after updating to 2.0.7 and holding the special button down a little longer "F20 up::" is not triggered, so both left control and right mouse button stay down. If I click and release the special button very quickly it's fine. The issue occurs only if I hold it down a bit longer.
Code: Select all
#Warn ; Recommended for catching common errors.
#SingleInstance force
f20_down := false
#HotIf WinActive("ahk_exe firefox.exe")
F20::
{
global f20_down
if(!f20_down)
{
Send "{LCtrl down}{RButton down}"
f20_down := true
}
return
}
F20 up::
{
global f20_down
Send "{LCtrl up}{RButton up}"
f20_down := false
return
}
#HotIf
It works as it should in AutoHotkey 2.0.6, but after updating to 2.0.7 and holding the special button down a little longer "F20 up::" is not triggered, so both left control and right mouse button stay down. If I click and release the special button very quickly it's fine. The issue occurs only if I hold it down a bit longer.