It's not a hardware issue, you can try it on the magic trackpad as well, they tweaked the dead-zone. The magic trackpad dead-zone seems about right though in that's it's less than a finger-width from the edge (although this is still larger than what it was < 10.8, there you can basically get right to the edge without issue). For inbuilt trackpad it's about a finger and a half width which is too large and it's causing the issues of dropped tap-to-click at the edges.
Note that this is just a guess based on experimentation, I'm not going to dig into the MultitouchHID kext again to find the codepath responsible for this because I don't use tap-to-click on inbuilt trackpad and it's not going to be useful to anyone anyway since probably no one wants to disable sip and patch things. Plus I already gave a suggestion of how you can work around from userspace using your own frame callback and post click event yourself after a tap (and do it better than apple, because you can actually do palm rejection right).
This isn't the first time they messed up the dead-zone width though, but I'm surprised they haven't fixed it yet because if it's like the last change the check is done in one "isBlocked" function and it's literally just comparing against edge-zone bitmask. I think it might even be intentional because everyone complained the new trackpad was too large, and this is the laziest way they could think of fixing it.
I'm just pissed because pinch-zoom is broken as well and recreating that from userspace is too tedious that I don't really want to do it. I mean I think it's basically the same formula, use an event callback and post the fluid zoom event, but then I need to write an entire gesture recognition library to properly recognize two-finger pinch zoom and correlate that to zoom state. Seems like too much effort compared to giving the thing a whack every time (read: disabling/enabling pinch zoom, which I've hooked up to BTT). If someone happens to already have that portion written or wants to write it, please let me know... (btt dev probably has gesture recognition library, but I don't think he's willing to open source it)
Edit: Aha seems like based on post on
https://community.folivora.ai/t/script-to-reenable-trackpad-zoom/7669/6 there's already hidden flag BTTAutomaticallyRefreshPinches to do this. Now I wonder how it works..
Code:
if ([[**_NSApp delegate] runningOn_10_12]) {
instance = [NSClassFromString(@"MTTGestureBackEnd") sharedInstance]
oldVal = [instance twoFingerPinch];
if (oldVal > 0x0) {
[instance setTwoFingerPinch:0x0];
[instance setTwoFingerPinch:oldVal];
}
oldVal = [instance multiFingerPinch];
if (oldVal > 0x0) {
[instance setMultiFingerPinch:0x0];
[instance setMultiFingerPinch:oldVal];
}
}
return;
And it's called in the following places:
* [delegate applicationDidFinishLaunching]
* [BTTActions init]
* nonInterceptingDragCallback (called by CGEventTap whenever mouse drag operation)
* allCB – which as the name implies is basically the master method for a ton of different event taps (I see "gestures, spotify, chrome, withoutgestures, mousemoved, scroll, normalmice).
Well that's a bit disappointing, basically same way I was doing it. Guess there's no magic sauce after all, it's bodging all the way down. Seems a bit wasteful to refresh it on every action imo, but I guess it works? Also interesting since I saw that a 0.5 sec delay was needed between setting old val and setting new val in order for it to work.
Edit 2: Another thread about this:
https://community.folivora.ai/t/anyone-having-issues-with-pinch-to-zoom/2591/14 seems like it's actually not a MultitouchHID issue per se but cause by things using cgeventtap. I wish radar was public so I could see more bug detail. My best guess is that due to whatever bug this is, the zoom event does indeed get generated, goes through the normal event tap flow, but somehow gets swallowed before being delivered. What a stupid bug, and one that has 0 documentation online, up until now I was thinking it was at the multitouchhid event-generation level but seems like I was wrong, it gets swallowed later on.
So to recap, seem to be 2 ongoing trackpad issues:
* Tap-to-click not working on edges. My best guess is apple botched dead zone here, needs further investigation. Workaround is relatively easy to do from userspace, but too lazy to do it myself.
* Pinch-zoom stops working. This isn't a trackpad related issue, it's caused higher-up in the stack and is triggered when process has a cgeventtap intercepting events; according to BTT dev, events get swallowed somehow. Hypothesis seems reasonable to me I suppose... although I've never had synthetically generated fluid-zoom events get swallowed though, so I'm still not 100% convinced.