0

I am trying to map the two side buttons of my Logitech Anywhere MX 3 to volume increment/decrement without using any additional tools, ideally using hidutil.

My idea was to generate a plist for launch, like done here.

Karabiner-Elements is able to map without problems: Screenshot of Karabiner-Elements Preferences window

I'd been able to identify the correct device for the hidutil matching:

Devices:
VendorID ProductID LocationID UsagePage Usage RegistryID  Transport            Class                      Product                                      UserClass                                       Built-In 
0x46d    0xb025    0xaa3c803e 1         2     0x100000c18 Bluetooth Low Energy IOHIDResource              MX Anywhere 3                                (null)                                          (null)

Now I am trying to find the correct key codes for Button 4 and Button 5 and Volume Decrement and Increment for several days.

Is anybody aware of them?

Apple only lists keyboard key codes in their Technotes.

Cross-Post also on Github.

P.S.: Initially I wanted to map the middle button below the wheel, too but this button does not generate any events. I know there is a way to adjust the firmware for Logitech mice (here MX Revolution) to change the wheel's behavior, but that would require a rewrite for macOS. (See the Ensourced article "Linux, MX Revolution and the Middle mouse button")

9
  • The MX series are well-known for not transmitting regular key codes. You usually have to use Logitech Options.
    – Tetsujin
    Aug 19 at 8:12
  • @Tetsujin I know, but Button 4 and 5 send common key codes, observable without Logitech Options e.g. using Karabiner-Elements Viewer. That's why I want to map these, not others. Unfortunately Karabiner / Better Touch Tool etc do not show the raw values of those codes. Aug 19 at 8:21
  • Have you tried Key Codes (freeware) - I had a look but I'm seeing what Options is mapping to so can't test without disabling & reboot.
    – Tetsujin
    Aug 19 at 8:30
  • 1
    There was a lot of blog posting around the interwebz about this stuff from the 3rd party mouse driver guys [USB Overdrive, SteerMouse etc] when these first came out. After a decade or more of using SteerMouse [for 'regular' multi-button mice], I had to eventually give up & use Options, because nothing else could intercept it properly. [You can't even get them to work in tandem like with other proprietary drivers, it ends up being either/or.] I have to admit I gave up the fight a couple of years ago & haven't re-investigated since.
    – Tetsujin
    Aug 19 at 8:44
  • 1
    Wish you luck but I can't really investigate further. I've tried periodically with newer versions of SteerMouse over the past few years - totally uninstalling Options - to eventually have to swap back again because SteerMouse just cannot handle the buttons 'properly', in a way I'd actually want it to. I was great on my previous MX-518 :\
    – Tetsujin
    Aug 19 at 8:50
1

Not possible with hidutil, but I wrote a small Daemon with very low resource consumption doing this: https://github.com/winkelsdorf/MouseEnhancer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .