dumbeau / AutoHotPie

Radial menus in Windows, aka PIE MENYOOS!
MIT License
340 stars 18 forks source link

[Bug] Mouse button 4 and 5 (Forward and Back) do not trigger Pie menu #54

Closed Sineval closed 2 years ago

Sineval commented 2 years ago

I am using Logitech MX Ergo where both Forward (Mouse Button 4) and back (Mouse Button 5) are used with the same finger as the LMB, so they are perfect for stuff like Radial Menus. Unfortunately, they do not trigger the Pie Menu assigned to it, even though they are detected by the program when selecting them via “Press a key”.

Context: OS: Windows 10 Version 10.0.19044 Build 19044 Auto Hot Pie version: 1.0.19-alpha

dumbeau commented 2 years ago

Some mice send the key-down and key-up events immediately when the button is pressed. Could you verify that the menu still doesn't work if you use either of these two activation modes? image

Sineval commented 2 years ago

I was just about to write something like that, as rebinding the Forward to Insert in Logitech Options didn't help, so this is definitely an issue with the MX Ergo. Will look into AHK for handling Up/Down events, since those two options are either way too unpredictable (Hover over all selections) or too slow (Click selections) for me :)

dumbeau commented 2 years ago

Those last two modes were made in response to this kind of issue, I'm not personally a fan of them either. That's weird that Logitech would make their gaming line send key-up and key-down inline with the button actions, but not their office mice. I don't think you're going to find anything in in AHK that can help here, considering the mouse (or the mouse software) is sending Key-up and key-down on button press, and then sends nothing when released.

I think your best chance is making a feature request or bug report in the Logitech options software. Closing, but feel free to respond if you find anything.

Sineval commented 2 years ago

On the AHK front, you can actually bind buttons to key down and up events like this:

XButton1::{ Send("{ XButton1 Down }") } XButton1 Up::{ Send("{ XButton1 Up }") }

XButton2::{ Send("{ XButton2 Down }") } XButton2 Up::{ Send("{ XButton2 Up }") }

And it seems to work (the key history shows that holding the button down only sends the down event), but AHP does not seem to register it. Maybe it intercepts the key before AHK can, or something?