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.
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.
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
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.
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 but it works
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.
Yes! It was just updated a couple of minutes ago. So far, everything seems to be working as intended. Thanks a lot.
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. . 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.
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.
I have the same problem and writing the code in the terminal didn't fix it.
What I am trying to do is use my right mouse button to pan the obsidian canvas.
The keyboard shortcut for panning is spacebar, so I m trying to click spacebar down AND HOLD IT DOWN while right click is down .
What is the solution to this ?
Unfortunately that's not yet possible. I'm working on Logitech support, which will eventually allow to remap any Logitech mouse keys to the system buttons, but it's not yet available. Currently you'd need the Steer Mouse app to remap button 4 to the system button 4.
I did notice in the advanced configuration, while "middle_mouse_down" is available under "Other Current State" when I tried to use it as a condition to be met when clicking a button, it's not an option in the gui, nor does it work if I edit the "Condition as code".
I'm trying to have a trigger when I click the right button when I already have the middle button pressed.
I created a trigger for Right Click, and then edited under "Condition as code" to have middle_mouse_down == 1 but the action triggers whenever I right click whether or not I have the middle button pressed?