Mouse Clicks: Configure different functionality for long or short presses

BetterTouchTool 3.960 added support for configuring long press actions for any mouse button.
Here is a small tutorial on how to set this up:

Configuring the long press
1.) Go to the "Normal Mouse" section in BTT. (Even if you want to configure a long press for Trackpad or Magic Mouse left/right clicks).

2.) Add a new trigger and record the button you want to use for the long press.

3.) Go to the advanced settings and set a minimum hold time. If you press the button for this amount of time, the actions for this trigger will be executed. You can also decide whether you want to allow mouse movement - or whether the long press should not be executed if the mouse has moved after pressing. (This can be helpful if you use the button for dragging stuff around)

Configuring a separate action for short press
4.) Add another trigger and configure it for the same mouse button. However this time choose to "Trigger on mouse up". Then set a "Maximum hold time" that is smaller than what you have configured in step 3. By doing this it this one will not trigger after a long press.

Using combinations of "minimum hold time" and "maximum hold time" you can even configure different actions based on the duration of your button press (this works only on mouse up).

This sounds exactly like what I'm looking for at the moment! So thanks a lot!

Unfortunately however in my case "Trigger on Mouse up" for my mouse buttons 3 & 4 does only work if I tie the trigger to a modifier key. If I leave out the modifier key, I only get a response at "Trigger on Mouse Down" on both buttons.

I tested it with the mouse wheel (middle mouse button) as well, and there it works as expected without issues.
Do you have an Idea how I could fix this?

Additionally (and slightly off topic)
Is there a way, to use additional mouse buttons in the advanced conditions tab? I've been trying to give my mouse scroll different actions, depending on which mouse button is pressed. So far I couldn't figure out, how to use the other mouse buttons as conditions.

Any help would be much appreciated! :slight_smile: Thanks

That might be a bug. Could you try to quit BTT and then run this terminal command?

defaults write com.hegenberg.BetterTouchTool BTTAllowLeftClickWithoutModifier YES

Maybe I accidentally disabled this for other buttons as well. I'm using it with my Logitech MX Master 3 with buttons 3 and 4, but maybe I already have some setting enabled that allows me to.

For the conditions, you can require other buttons to be pressed like this:

Thanks for the quick reply!

I just ran the terminal command and the issue is still the same.
I only have very limited knowledge when it comes to programming. But it seems to me, that the problem lies somewhere else, because If you actually disabled it for the other buttons, they shouldn't work at all without adding a modifier, right?
But they work completely fine without modifier, just as long as they are set to Trigger on Mouse down. Only when I set the Trigger on Mouse Up, I suddenly need a modifier, which luckily enough I found out by accident :sweat_smile:

And thanks again, for taking your time, tending to my issues and replying so fast!:))

So now I have I have to start asking the really stupid questions here :sweat_smile:
How do I get this condition added to the drop down menu? :thinking:

The logic for short/long press of mouse clicks is the same as for the keys. If someone needs the short click action by down (instead of up) for whatever reason the setting can be reversed. But that makes less sense here, because in contrast to the keys there can be no letter twisters, of course. :slightly_smiling_face:

It might make sense if two actions are to be executed with one click. By reversing, the short press action is always executed when the long press action is executed. But this can also be done in another way.

I know, nobody understands this. I don't understand it myself :joy: but it works :slightly_smiling_face:

Update:
I just found out, that I am not using the most recent alpha of BTT ;(
Sorry for that, should've checked that first..

Well, I got my license via a Setapp subscription, so there is nothing I can do until they update their version of BTT. Guess I have to wait then :wink:

ah :slight_smile: setapp should also show the current version, I uploaded it earlier today!

That works for mouse buttons 0 and 1 (left and right buttons) but not for any other buttons on my mouse (an old Logitech MX310) - 2 (scroll wheel click), 3 (back), 4 (forward) and 5 (window/app switch).

Having written that, and had another play, its not working for any buttons! I've tried disabling all mouse triggers and it hasn't helped (nor have those triggers stopped working, another concern).

Restarting from the BTT menu and quiting and reloading BTT haven't helped either.

I've just added a fn key modifier to all existing mouse triggers and mouse buttons 2-5 now show in the currently pressed variable. FWIW, most of the triggers are JS and contain, potentially recursive, setTimeout() calls. Though I can't see why this should prevent everything spring back into life on a BTT restart.

1 Like

Yes! It was just updated a couple of minutes ago. So far, everything seems to be working as intended. Thanks a lot. :star_struck: :+1:

BTW: I can't access https://folivora.ai on my mac. I have to manually put in the www. and then it works. On my iPhone however it works both ways in the same WIFI. :thinking:. I tried a couple of things like flushing DNS, deleting cache, VPN, iPhone hotspot, but nothing helped. I have no idea if I am being the only one, having this issue or not.
Just wanted to let you know, in case I'm not. :v:

It seems that currently_pressed_mouse_buttons variable works, but only until a trigger is created for a mouse button. Once a mouse button is assigned a trigger it no longer appears in currently_pressed_mouse_buttons. Delete the trigger and the mouse button show up in the variable again.

True! I’ll fix that!