Improve options for "mouse position" type triggers

Various triggers exist which are activated purely by the cursor position (without any key/mouse button presses), but the only positions which can be used are the extremes: the screen edges and corners.

1.
The feature request is to expand this to allow crossing any arbitrary x or y position as a trigger. For example, the user could choose the trigger to be activated when crossing an x position of 915 pixels.

In addition to defining the position of the trigger line by x and/or y coordinates/percentages, there would be options for direction of movement (eg: trigger line defined at x:915px, this could be triggered when passing the line left-to-right, right-to-left, or both).

(Please note this is distinct from "Advanced Conditions" which already allow arbitrary coordinates, but only as conditions when another trigger is used.)

2.
Related feature request: Among the "Advanced Conditions" there are many options for conditions based on cursor position, but they are all relative to the screen or the active window. Would it be at all possible to add relative to the trigger position as Advanced Conditions?

Meaning cursor coordinates at the moment of activating the trigger are considered 0x,0y and then mouse movements relative to this can be defined as Advanced Conditions in just the same way as they can be defined relative to the 0x,0y of the screen or the active window.

3.
Related minor request: The "Move Mouse Away From Screen Edge" triggers would really benefit from a timeout function.
It would make these triggers much more usable to be able to have a parameter "only within x seconds of hitting the edge".

Thanks.

If I understood correctly, 1 would require to constantly observe the mouse position and possibly reevaluate all configured "position triggers" at every mouse move. What would be your use case for this?
(For the corners and edges I have lots of small optimizations that make the performance impact bearable, but making it generic would be some more work...)

2.) I don't think that would work as advanced conditions are always evaluated at the moment the trigger is triggered. This means there can not be any mouse movement at that moment.

3.) You could probably use the "seconds_since_last_trigger" advanced condition for this. It would be set to 0 when the "Move Mouse To XX" trigger is triggered.

  1. Oh I see. I had assumed BTT was always observing the position anyway, and that having a trigger at a certain arbitrary position wouldn't be any different to having it trigger at the edges.
    The use case is to have floating menus appear and disappear automatically depending on what area of the screen I'm working in, without having to manually trigger them by some key/button/gesture etc.

  2. Ok fair enough.

  3. Yes this method works, but the workaround of having to make a "move mouse to bottom edge" trigger with an empty action, then make a separate trigger for "move mouse away from bottom edge" with the Advanced Condition timeout (as it's timing since the empty trigger was fired) is a little clunky.
    I've actually got many of these set up already, but thought the "move mouse away from edge" was so natural to pair with a timeout that it's the kind of thing that should just be a built-in option, as the solution for setting up the timer isn't quite obvious, and these triggers are much less useful without it (imo). I think these "move away" triggers would be much more useable with a built-in timer option in the way that other triggers have a "Delay before triggering" or "Minimum time button needs to be pressed" slider.

yep I agree that a timeout option would be good! Should be easy to add.

I'll think about the mouse movement observation.

1 Like

Cool. Also, quick bug on the "Move mouse away from screen edge" settings:

The "Distance Required" slider allows setting up to 300px. It's possible to bypass the slider and directly type in a larger number, say 800px, and this works, but when returning to look at the trigger it will still show "300px", though it's still operational at 800px.