rxhanson / Middle-Community

Discussion, Bugs, and Localization for the Middle app (for macOS middle clicking)
https://middleclick.app
20 stars 39 forks source link

MBP trackpad's force click setting causes undesired behavior #63

Open rcdailey opened 1 year ago

rcdailey commented 1 year ago

I have a new 2023 MBP. I ended up turning off "Force click and haptic feedback" option under Trackpad Settings, because I found that it was too easy to accidentally push too hard and cause that secondary click. Unfortunately, when this happens, it registers as two separate clicks. So for example in the MS Edge Browser, when I use three-finger clicks to close tabs and the secondary/force click happens, it closes 2 tabs instead of one.

Even though I have that force click setting set to OFF, sometimes that secondary click still happens! I don't know if this is a bug with Middle or MacOS. I think in either case, it would be reasonable to request that there be a setting in Middle that allows me to ignore the secondary/force click. In other words, even if that force click does happen, enabling this new setting would prevent that from being treated as yet-another middle mouse button click.

rxhanson commented 1 year ago

Thanks for reporting. Unfortunately, as far as I know there is no way to prevent that additional click. The reason is because macOS provides no way to differentiate clicks. It's been a while since I've looked into this, though, so I'll see if I can find any different results with a fresh perspective.

rcdailey commented 1 year ago

Could you implement a customizable delay? For example, any middle click that happens within 100ms of the previous click gets dropped? I think this is a reasonable workaround because it doesn't require disambiguating the click types, and also I think personally it's hard to be humanly able to click again within 100ms, but hey that's why it's customizable I guess?

So for the UI, I would recommend:

  1. A "Click Debounce" setting with both an edit field to configure the delay, as well as a checkbox to enable/disable the feature entirely.
  2. When the checkbox is enabled, it allows an edit field to be modified which contains the debounce delay. It would default to some reasonable delay, such as 100ms.
  3. When the checkbox is disabled, the edit box is either hidden or remains shown but not editable.
  4. If a value of 0ms is entered, this fails input validation. If this should be considered valid input, alternatively to disable the feature 0ms can be used instead of a checkbox. But I do not feel this is good UX.
  5. This setting would default to OFF to avoid impacting existing users.

Hope that seems reasonable, assuming you don't find any better solutions!