fix: add support for Lift DPI Button Detection + Drag / support for MacOS 27 - #1938
Open
nikuscs wants to merge 5 commits into
Open
fix: add support for Lift DPI Button Detection + Drag / support for MacOS 27#1938nikuscs wants to merge 5 commits into
nikuscs wants to merge 5 commits into
Conversation
…a buttons Fixes noah-nuebling#1791, noah-nuebling#1790, noah-nuebling#1800, noah-nuebling#1740, noah-nuebling#1744 Logitech mice with extra buttons (thumb, tilt wheel, precision, side buttons) use HID++ 2.0 ReprogControlsV4 (feature 0x1B04). These buttons are silently consumed by the mouse firmware until the host sends a SetCidReporting command to divert them. Once diverted, they arrive as 0x11 long reports. This implementation calls Buttons.handleInput() directly — no CGEvent round-trip needed, no extra event tap overhead. Protocol: - GetFeature(0x1B04) -> feature index - GetCount -> number of controls on this device - GetCidInfo for each control -> CID, TID, capability flags - Skip controls whose TID maps to a native HID button (L/R/M/Back/Fwd) - SetCidReporting with flags=0x03 (divert=1, divert_valid=1) for the rest The flags byte follows the 'valid bit' pattern documented in Solaar (pwr-Solaar/Solaar hidpp20.py): each flag bit has a corresponding valid bit = flag << 1, telling firmware the field is being intentionally set. TID-based filtering correctly excludes natively-reported buttons across all Logitech models without any per-device hardcoding. Tested on: Logitech M720 Triathlon (Bluetooth), macOS 15 Sequoia, macOS 26 - Left tilt (CID=0x005B) -> button 6 in MMF ✅ - Right tilt (CID=0x005D) -> button 7 in MMF ✅ - Thumb (CID=0x00D0) -> button 8 in MMF ✅ - Back/forward continue working natively (not diverted) ✅ References: - https://github.com/pwr-Solaar/Solaar (hidpp20.py) - https://github.com/libratbag/libratbag (hidpp20.c) - https://lekensteyn.nl/files/logitech/x1b04_specialkeysmsebuttons.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Like the title says adds support for Logictech DPI Button support detected as Button 6, and also support for MacOS 27 mission control + drag events & smooth transition velocity.
Tested with:
The PR was done with help of AI, reviewed and checked, let me know if its helpful.