Screen edge mouse gestures

4.033 (currently building) adds this as a hidden option for now. You can change the check interval via this terminal command (BTT needs to be quit):

defaults write com.hegenberg.BetterTouchTool BTTMouseCheckInterval 0.1

The default value is 0.2

2 Likes

I updated to 4.033 and changed the value to 0.1. That helps a lot! Can I go even lower?

Update: I ran the command again with 0.05 and it feels just as fast as Hot Corners now. (Not sure if that is a legal value but it seemed to work.)

1 Like

For what it's worth I figured I'd write a quick follow up to the original post here (as the idea received a few votes, but this thread immediately diverted to being about the addition of Left/Right Screen Edge triggers) as I got it functioning with a workaround using "Advanced Conditions...".

Edge/corner triggers can be used in combination by first setting up "blank" triggers which don't do anything by themselves, and then using the "BTTLastTriggeredAction" condition

  1. Create a new Named Trigger with no action assigned.
  2. Create a new (first level) Trigger using one of the basic Top/Bottom/Left/Right Screen Edge triggers, with the assigned action of the actionless Named Trigger created in (1). This means that when you hit the specified screen edge, BTT will register this as an action happening, but nothing will actually happen.
  3. Create a new (second level) Trigger using one of the other Screen Edge triggers. Using "Advanced Conditions...", apply the condition that the "BTTLastTriggeredAction" is that of the first level Trigger created in (2). (The ID number of the Last Triggered Action can be seen in the Advanced Conditions Current State panel.)

Using this procedure, you can have triggers which are fired by bouncing the cursor from edge to edge, which is quick and easy and requires very low accuracy. This multiplies the Screen-Edge triggers from 4 to 12, and many more if using the same technique with the corner triggers (though I haven't tried this yet as hitting the corner often involves hitting an edge first).

Many more edge triggers could be used if setting x/y position limits in Advanced Conditions, but I haven't tried this either (for example, instead of just "Left Screen Edge" being a trigger, you could effectively use "top of Left Screen Edge" and "bottom of Left Screen Edge" as separate triggers).

It also means you don't get false positive triggers fired which happens when using the standard Screen-Edge triggers and moving the cursor to the edge inadvertently.

If anyone knows of a better/more efficient way to do this I'd be grateful for advice.

2 Likes

Sorry for asking here, cant find this anywhere but how to I install alpha? This update would come really timely as I've just got a recent need to have left edge mouse actions :sweat_smile:

Nevermind, understand now, any ETA on releasing an update to setapp? :pray: @Andreas_Hegenberg

that's already included in the setapp version :wink:

Recent update? could have sworn it wasn't there yesterday :joy:
Sorry for perturbing!

@Andreas_Hegenberg is it possible to limit the trigger "Move Mouse To Left Edge Of Screen" to only a vertical portion of the left edge like in the screenshot below?

For example, only trigger when the mouse touches the center portion of the left edge, but ignore if the mouse is in the top/bottom 25%? Possible using Trigger Conditions > Advanced Conditions?

Thanks!

If you have only one monitor it can be done using advanced trigger conditions, however there is currently a bug that breaks this for setups with more than one monitor. I'll fix that.

@aesterling
I have many of this type of screen edge gesture set up, they're great. When I get some time I'm going to make a post in the tutorial section outlining all the various types of mouse-gesture triggers that are available (aside from the main "mouse gestures" function of BTT) as there are a lot of options.

Excellent, thank you for the quick response! Unfortunately, I have two monitors stacked vertically. Please let us know when you've had time to fix the bug. :grinning: Thanks!

@Walnut That's awesome! Is your method compatible with multiple monitors? I'd love to try it out when you have time to share.

I only use a single monitor so can't say about multiple monitors.

I'll do a proper write-up when I can, but in the meantime here's a couple of things you might want to consider for ideas:

One method is bouncing the cursor between different edges, as I detailed in my previous reply above.

Another is using "move mouse AWAY from screen edge" triggers rather than "move mouse TO screen edge". (This also relies on empty triggers as described for the bouncing method above.) I have them set to about 400 pixels distance (the slider bar only goes to 300 but you can type in higher values), along with an Advanced Condition of "seconds_since_last_trigger <= 0.6". These are used by whipping the cursor to hit the edge of the screen and then back to the middle of the screen within half a second.

As it's quite a large distance but with a very quick timeout it won't be triggered accidentally (which I find is the problem with the "TO screen edge" triggers), but is very easy to activate. I have each screen edge divided into thirds and use it for app/window switching etc

1 Like

the mouse_pos_percent_x and y variables are now fixed in 4.273 alpha and should work fine on multi monitor setups. (They are anchored at the top left corner of the screen, thus e.g. the middle left edge of the screen will be x=0% y= -50%, so your conditions need to work with negative y)

Awesome, I'll update and try it as soon as I get home. Thank you!

@Andreas_Hegenberg this is working perfectly in 4.273. Thanks for the update and the help!

1 Like

Hello @Andreas_Hegenberg, the update from 4.283 to 4.290 caused my triggers with Advanced Conditions to stop working.

If I remove the Advanced Conditions, my "Move mouse to edge of screen" triggers" work correctly.

I also tested the latest release 4.401 but the problem seems to exist in every version since 4.290. I just emailed you my Bug report diagnostic info and my exported_triggers.bttpreset

Please let me know if there's something I can change to fix this on my end or if BTT needs an update to fix it.

Thanks!

There was a bug/inconsistency in the older versions which I unfortunately needed to fix because it caused issues in other places. Problem is the "mouse_pos_percent_y" is supposed to be from the top left screen corner. This means the values actually need to be negative and the condition needs to be adapted.

So your condition should probably be
mouse_pos_percent_y <= -7 AND mouse_pos_percent_y >= -45

(I thought I had some code that auto converted the conditions, but maybe for some reason that didn't trigger in your case)

1 Like

Thank you, once again! That suggestion fixed it and everything is working great on the latest version. :+1: