Is there a way to switch to Finder when clicking an empty space of the desktop?

Is there a way to switch to Finder when clicking an empty space of the desktop?

It could be done via a leftclick trigger and an advanced trigger condition that checks the hovered elemnet. However the problem with this is that every left-click would need to evaluate the currently hovered element. While this will work, I wouldn't recommend it because it could cause small delays in other apps.

If a double-click would also be ok (or a click with some special mouse button) that would be much better.

A double-click with the left button would be ok. How should I configure it?

I don't need this behaviour when Finder is the front app, only when Finder is not the front app. I wonder if it would be convenient to add this as an advanced condition to reduce delays/cpu.

With double-click the nice thing is that "Desktop is Finder". This means the first click already activates finder, so the condition can be scoped to "active app = finder".

Here is an example:
DesktopClick.bttpreset (3.6 KB)

However you need to make sure to disable the default click behavior in System Settings:

Thanks for your help, Andreas!

Your assumption that the first click activates the Finder is not correct in my setup, so I can't implement your proposal.

If I click the wallpaper when the frontmost app is not Finder, the left click does not activate nothing. It has no impact (it doesn't activate the desktop and it does't activate the Finder).

I have configured macOS settings to not show the desktop items, and to not show the desktop when clicking the wallpaper (it's set to "Only in Stage Manager").

If you try to disable the option for not showing items on desktop, you will notice that clicking the wallpaper does not activate the Finder.

I want to keep the macos settings as I have it. The only thing I would like to improve in my setup is to switch to Finder if I click/double click the wallpaper when Finder is not the frontmost app.

In other words, I want to keep the desktop items hidden but still be able to activate Finder when I click on an empty space of the wallpaper.

Is that possible in BTT without causing delays or performace issues? What do you think?

In that case just move the trigger from Finder to "All Apps". For double-clicks the performance impact is much less of a problem (should not be noticeable at all)

//edit: ah one moment, the condition needs to change slightly when the "show items" option is disabled. I'll look into it in a minute

Ha unfortunately it looks like macOS completely disables any interactivity if the "Show Items" option is disabled. This also includes all "hovered element information" which means the approach won't work.

The only other way I could think of is to place an invisible overlay over the Desktop using a floating menu and have a dummy item in that floating menu that triggers the behavior:

DesktopClickFloating.bttpreset (7.1 KB)

It seems to work fine here but might need further testing

Ah this condition should work and is much simpler than the floating menu approach:

NOT (hovered_element_details CONTAINS "AXWindow")

DesktopClick2.bttpreset (7.1 KB)

This seems to work very good. Thanks a lot!

I have configured the trigger like this:

  • Triple left click
  • Advanced Condition: NOT (active_app_name == "Finder" OR hovered_element_details CONTAINS "AXWindow")

I would like to add one condition to avoid the trigger when the mouse hovers the dock. How it should be this condition?

And another question: the time for triple left click must be configured in the BTT settings, isn't it?

no, double/triple left click timing is system defined:

I saw that option, but I only want to avoid the dock.

I want to keep the trgger for the menubar.

I'm a bit fickle, I know :grinning_face_with_smiling_eyes:

Then you need to modify the condition:

NOT (hovered_element_details CONTAINS "AXWindow" OR hovered_element_details CONTAINS "AXDock")

It is working perfectly, thanks a lot.

As it works so efficiently, I was wondering to test a single left click as trigger, but it seems that I can only configure it with a modifier.

Is there any option to try the single left button without modifiers as a trigger?

You can by enabling this checkbox, just make sure to have the advanced conditions set first otherwise your left-click will be blocked:

Thanks a lot Andreas, it is working great !!!

:grinning_face: