-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any support for silent clicking? #28
Comments
@andportnoy the driver only supports basic functionality. Neither Force-Touch nor configuration of click-strength is configurable right now. Maybe i (or someone else) will have a look at it in the future when 4.20 which includes the driver is released, but right now i am not working on the driver. You could use tap-to-click in the meantime. |
@robotrovsky Thank you for the clarification and thank you for the terrific work! I've been using the touchpad for a couple of days now and it's working great. |
@andportnoy you are welcome. Glad to hear that people are using their trackpad. |
@robotrovsky Just wondering, how did you figure out how to build the driver and what the trackpad is sending? Was it through some kind of packet interception? |
Yes, i started when i saw, that the Trackpad is working under Windows. So i used Wireshark to sniff the USB protocol. Once i figured out how to enable 10 Finger reporting i switched to Linux and compared the outcome of the driver with the Trackpad of my MacBook Touchpad. This was also why i first implemented it in the bcm5974 (touchpad driver). Afterwards i ported it over to the magicmouse driver which already contained the magic trackpad I, and added the bluetooth protocol, which @ponyfleisch reverse engineered (with OSX Bluetooth analyzer). |
I think @ponyfleisch also has some code to configure the strength of the click. Have a look at it here: |
@robotrovsky Thank you! |
Thanks to all the hints by @ponyfleisch and @robotrovsky and a little help from packet sniffer, I've figured it out! (at least for Bluetooth, no idea if it applies to USB as well yet) The click strength can be configured without switching the device out of autonomous clicking mode (using
Index 1 determines which feedback event you want to configure (0x22 is click, 0x23 is release). Values used by macOS:
"Silent mode" is the same, but two last values are always 0x00. I've played a bit and seems that all three values can be set between 0x00 and 0xFF for various feedback configurations, so you don't have to be limited to what macOS lets you choose. I'll try to prepare a proper patch and send it to the kernel maillist as soon as I figure out how to properly export those values as some config options :) |
I've just checked it on USB and the messages are the same (minus the first 0xF2 byte), only aren't sent as HID requests, but directly through URB_CONTROL. |
If someone wants to play with it, I have put my code at https://github.com/dos1/Linux-Magic-Trackpad-2-Driver for now :) |
Hmm, so what’s the status of this work? Are there plans to submit the patch for inclusion in the kernel? |
Hah, it somehow fell through cracks. I'll likely take a look at this driver in the next months since I've recently seen some kernel panics coming from it when using it via USB, so that may be a good occasion to at least send an RFC :) |
Ok, great, in the meantime, do you happen to know if there is any easy way to access the hidraw interface from the userspace? I mean, I was just thinking, in theory, it should be possible to somehow write this magic byte sequence without a kernel module? |
Yeah, I haven't really rushed with sending that patch out right away since I had a suspicion that it may be a thing that's better left for the user space. However, I haven't looked into hidraw at all and have no experience with it, so I don't know if there aren't some gotchas waiting to be discovered (especially given the fact that it has to be sent differently over USB and Bluetooth). The messages don't seem complicated though, so I think there's a chance it should be fine. |
@dos1, are you positive the panics were caused by your modifications? I'm asking because there have been some fixes to the mainline kernel. As mentioned elsewhere, libratbag/piper (libratbag/libratbag) might be a good way to do this configuration in userspace. |
Sorry to bother, but are there any updates on this? :) |
Apologies if this has been addressed somewhere else.
The text was updated successfully, but these errors were encountered: