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
Add confidence bit for palm rejection #547
base: master
Are you sure you want to change the base?
Conversation
I think we can preserve backwards compatibility by moving the field to the end of the struct. This should ensure that memory wise, the first N bytes will hold the existing transducer data. |
Ah that would solve it. We should probably have it default to a value of 1 as well so that everything isn't read in as a palm - what is the best way to do that? Edit: oh would there be any worries about out of bound reads if we did just add it to the end? |
That would indeed cause out of bound reads. Another option is to make the change and tell people to update their satellite lets. IMO, this has been the case for a while and I don't see any issue with us changing the class. |
Looking around, I think that is a safe assumption that can be made. The satellites compiled as part of VoodooI2C are the only ones to use this class. VoodooRMI and AlpsHID do not use the VoodooI2C transducer, instead interacting directly with VoodooInput. I think this PR is good to go as well as the Elans PR. |
Thanks @1Revenger1. I'll merge these in when I get the chance to fix the pipelines. |
No worries. If anyone wants to give these a shot, I've got a download here with VoodooI2C, VoodooI2CHID, and VoodooI2CELAN. |
Hi, there. Since it is related to MT2 simulating, would it be better to add the palm type in |
Probably should yeah. I can add it later tonight. |
It was a hack from when Rehanman was maintaining VoodooPS2 (so about 6-7 years back). IPC in kernel-space is tough so abusing the quiet time field to receive notifications from the keyboard driver made a lot of sense. |
Yeah, and we haven't really had a reason to forward invalid things to macOS before this since macOS would have treated it as valid data. I'm not faulting anyone here, palm rejection is just a pain in general haha. |
I opened the VoodooI2CHID PR and merged in the new finger type into VoodooInput, so everything should be good to go. |
@1Revenger1 thank you - working fine in Monterey (Sonoma not tested yet) in my Asus Vivobook S15 with an ELAN1200 (VID 0x4f3 | PID 0x303e) |
I was parsing the MT2 output for some other projects and came across a new finger ID. This seems to only be sent when the touchpad detects a palm. This seems to map well to the confidence bit sent by Precision/HID touchpads, and allow for rejecting contacts based off of size relatively easily.
This does break every satellite since the Transducer class is modified, so some caution is needed before trying to merge this in.
Companion ELAN implementation:
1Revenger1/VoodooI2CELAN#1
Companion HID implementation:
1Revenger1/VoodooI2CHID#1