How to "real" middle-click on video previews in Safari?

Hey guys,

I'm wondering if you can help me out with one issue that I've learned to live with since switching over from Windows/Linux:

I got BTT in my first week of using macOS to emulate the middle-click by clicking with three fingers. It's working in most of the use cases but not when three-finger-clicking on video previews, e. g. on YouTube. I can "middle-click" on the video title and the video will be opened in a new tab like intended and I can close tabs by "middle-clicking" too. But when "middle-clicking" on video previews, Safari will just open the video in the current tab (unintended behaviour).

I tried binding my three finger-click to ⌘ + 1-finger click which solves that issue but adds the problem that I can now no longer close tabs by three-finger-clicking on them.

Any help would be much appreciated! :smiling_face:

Really no one unsettled by this problem? :see_no_evil:

You are right, Safari responds weirdly to the BTT default middle click with Youtube. I have no idea why that is, might be some custom code in Youtube.
Try to use the custom click action in BTT like this instead:

Thanks for your reply, mate! Unfortunately this doesn't work either. I am curious: Is your suggestion working for you? If so, are there any preferences in BTT that might be required for the middle click to work properly?

Thanks again for your help! :heart_hands:

Weird, it's working fine for me with that custom click setting. No other settings ;-(
running macOS 14.3

1 Like

Aight, thanks anyway for your kind help!

Do you happen to know if it's possible to specify two different middle-click emulations depending on wether I am hovering the tab bar vs the web page view. This way I could just make BTT use the ⌘ + 1-finger-click for web links (this does work for all links, incl. youtube previews) and your solution (or ⌘ + W) for the tab bar.

You can add an advanced trigger condition to one three finger tap with this condition (which is true when the tab is hovered):

hovered_element_details CONTAINS " <AXGroup: \"tab bar\">"

And add this condition to another three finger tap trigger (which is true when not hovering the tab bar)

NOT (hovered_element_details CONTAINS " <AXGroup: \"tab bar\">")

Probably a more performant way would be to check the position of the mouse cursor inside the window, this could be done using the dist_y_active_win_top_left variable.

THANK YOU SO MUCH! It finally works, yay! :smiling_face::heart_hands: Since you mentioned it, do you think this config is high on the performance-usage side? (I'm rocking M1 with only 8 GB of RAM) :melting_face:

not a problem because it will only evaluate the condition when a three finger tap is recognized. It might just be slightly faster when using the mouse position. If it’s fast enough, don’t worry about it

Alright, thanks a lot again for your kind help! :smiling_face: