Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
A Keymaker
Posts: 454
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by A Keymaker » 23 Jan 2023, 17:37

[This is most likely not bug of AutoHotkey- but I think that bug section is the most suitable for this topic]

Coming out out from this thread of mine https://www.autohotkey.com/boards/viewtopic.php?f=76&t=112961&p=503495 and as summarized in this post https://www.autohotkey.com/boards/viewtopic.php?f=76&t=112961&p=503583#p503583:


It seems that Middle Mouse Button is somehow unable to execute a script [from the aforementioned topic] like this

Code: Select all

; script author: mikeyww

#Requires AutoHotkey v1.1.33
MButton::
KeyWait MButton, T1.1  ; Wait for button to be released within 1.1 seconds
If ErrorLevel {        ; If not released,
 Send ^a               ;  send this key sequence,
 SoundBeep 1500        ;  and sound a beep;
} Else Click           ;  otherwise, click instead
Return	
even in native to Windows' environment Notepad - but at the same time it is able to comply with a script [from this topic https://www.autohotkey.com/boards/viewtopic.php?f=76&t=106886] like

Code: Select all

; script supervisor: boiler

; selection of files with Middle Mouse Button:

#If WinActive("ahk_exe Mp3tag.exe") && mouseOver("ahk_exe Mp3tag.exe", "SysListView321")

MButton Up::
    Sleep, 88
    Send ^{LButton}
    SoundBeep, 300
    Return

mouseOver(winTitle, ctl)
{
    MouseGetPos,,, hWnd, overCtl
Return WinExist(winTitle) && overCtl = ctl
}
in a much more complex and third party Mp3tag

That is: MMB does not work with code from the first example if it happens to be of either Logitech Mouse MX Anywhere 2 Business Travel/ Logitech Mouse MX Anywhere 2 For Amazon, Logitech Mouse MX Anywhere 2S or Logitech Mouse MX Anywhere 3


Also, a much earlier [in this https://www.autohotkey.com/boards/viewtopic.php?f=76&t=104945 topic], I apparently encountered the same issue with this code

Code: Select all

MButton::
    Send, {c down}
    KeyWait, MButton, T0.5
    if ErrorLevel
    Send, {c Up}{v Down}
    KeyWait, MButton
    Send, {v Up}{v Up}
return
that I utilize for Winamp, while using MX Anywhere 2. For whatever reason Winamp does not register holding down of MButton - despite being able to do register it for e.g. LButton, RButton or t. And thus this code works A-OK when MButton is replaced in it with any of those - which points out to the hardware as being the culprit; right?


So my question is: did anyone experience similar issue with any button of Logitech Mouse MX device or any other Logitech mouse; or any other mouse for that matter?


[I am using AutoHotkey 1.1.36.02 on Windows 10 Enterprise 20H2 19042.746 x64]
Last edited by A Keymaker on 23 Sep 2023, 03:00, edited 4 times in total.

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

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by lexikos » 18 Jun 2023, 02:38

This is obviously not an AutoHotkey bug. If AutoHotkey's mouse hook receives a WM_MBUTTONDOWN event, it will fire the hotkey. Whether such an event is raised when you push the button is up to the mouse, driver and OS. I would move the topic, but it looks like you already had one in Ask for Help.

User avatar
A Keymaker
Posts: 454
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by A Keymaker » 04 Jul 2023, 05:55

I hear you - but my question was
A Keymaker wrote:
23 Jan 2023, 17:37
[...]
did anyone experience similar issue with any button of Logitech Mouse MX device or any other Logitech mouse; or any other mouse for that matter?
Because maybe someone has resolved this issue outside of AutoHotkey

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

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by lexikos » 06 Jul 2023, 00:53

You posted in the Bug Reports forum. It is not a bug with AutoHotkey, and will not be fixed on my end. I marked the topic solved for my benefit, as I am primarily the one who deals with topics in Bug Reports (and fixes bugs!), and will not be dealing with this one. Even if it is not marked as solved, there are fewer people looking to help solve such problems in the Bug Reports forum because most users can't fix bugs.

Normally, I would just move your topic to Ask for Help, but as I said, it appeared you already had a topic there. Now I cannot find one about this same issue, so perhaps I was too hasty in assuming that one of your other topics was about the same issue. I have moved the topic to Ask for Help, where you may be more likely to get an answer.

User avatar
kunkel321
Posts: 972
Joined: 30 Nov 2015, 21:19

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by kunkel321 » 06 Jul 2023, 08:56

I just tried your top code and it seems to work correctly with my wireless mouse. I believe it's a Logitech, though I don't recall the model.

I use an AHK app called Quick Access Popup, which is activated by middle mouse button click. I find that every once in a while the app stops "seeing" the mouse button presses. I assume it has to do with other apps competing for the mouse hooks. It usually resolves itself in a few seconds. So no big deal.
ste(phen|ve) kunkel

User avatar
A Keymaker
Posts: 454
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by A Keymaker » 23 Sep 2023, 03:03

So did anyone else
A Keymaker wrote:
23 Jan 2023, 17:37
[...]
experience similar issue with any button of Logitech Mouse MX device or any other Logitech mouse; or any other mouse for that matter?
[...]
?

User avatar
A Keymaker
Posts: 454
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by A Keymaker » 13 Oct 2023, 06:22

It seems that I have run into similar problem with this mouse concerning ability to use its button for hotkeys, this time the issue being with the Right Mouse Button: viewtopic.php?f=76&t=122290

User avatar
kunkel321
Posts: 972
Joined: 30 Nov 2015, 21:19

Re: Middle Mouse Button of Logitech Mouse MX Anywhere devices does not respond to some scripts

Post by kunkel321 » 13 Oct 2023, 08:11

I doubt that it will be helpful, but you can sometimes "peek" at what hotkeys are being seen by AutoHotkkey. Right click the script's icon in Windows System Tray, and choose "Open." An editor-like window will open. From there, open the View Menu, and choose Key History.
ste(phen|ve) kunkel

Post Reply

Return to “Ask for Help (v1)”