feat: support MX Master 4 haptic thumb-rest button#179
Conversation
Promotes CID 0x01A0 from a "known but unsupported" control to a fully mappable button. Wires the new `haptic` logical button end-to-end: button name, event tuple, default mapping (none), v9→v10 migration, HAPTIC_DOWN/UP events, divert_haptic flag, platform dispatchers, and zh-CN/zh-TW translations. Adds an MX4-specific entry to KNOWN_LOGI_DEVICES that overrides supported_buttons to include `haptic`, registers `mx_master_4` in _LAYOUT_BUTTONS, and removes 0x01A0 from _KNOWN_UNSUPPORTED_CONTROLS. Adds a haptic hotspot to the catalog's MX Master 4 device layout (coordinates pending tuning against the real render). Refactors the engine's HID++ divert gating out of _setup_hooks into _apply_divert_flags(), and calls it from _on_connection_change on the connect leg only — the disconnect leg would race against the hook's device-keyed haptic divert and loop. Adds HidGestureListener. update_extra_diverts() so the engine can swap the divert set on a live listener (needed when the MX4 connects mid-session). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
68a033d to
ad57c16
Compare
|
cc @hieshima or @TomBadash for review, let me know if you have any issues with it, happy to make updates |
| else: | ||
| self.hook.register(evt_type, self._make_handler(action_id)) | ||
|
|
||
| def _apply_divert_flags(self): |
There was a problem hiding this comment.
Pulled out because reload_mappings never pushes the mappings to the Listener while running, this should fix that issue.
|
Hi @baileywickham, thank you for this PR! The button mapping foundation is solid and well-tested -- great work getting that in. After reviewing it, I think there are a few MX Master 4-specific features still missing that would make this feel complete: Haptic feedback itself -- triggering the physical haptic motor when the button is used In particular, two things I'd appreciate help thinking through: Which actions should trigger haptic feedback and how to let the user configure that (currently I have DPI cycle, task view, and smart scroll toggle wired up) |
|
Hey @TomBadash, yeah, I'm happy to help merge this into your branch/work with you on it. Let me take a look and get back to you with some ideas! |
|
@baileywickham great to hear that! Make sure to pull the latest version of the branch, I just pushed a few new updates. |
|
@TomBadash, sorry about the delay, I got distracted. Looks like you're branch has superseded my work! If you're still looking for help/opinions, let me know and I can take a look this weekend. Happy to help! |
|
I just wanted to say that @TomBadash you're doing gods work helping people move away from that cancer of a software.. i tested this PR (maybe the fix is in another PR?) but the 3rd button on the side is still being recognized as the gesture button. I'd be happy to test if you guys need help! just wanted to say thanks. side note: I also found that the smooth scrolling and some other options are hardware level (or at least they can be turned on that way) i could be wrong though. |
Add support for the MX master 4 hapic button on the thumb. Fixes #119
AI use:
Written with Claude's help, I reviewed the code myself before creating PR.