"Move mouse to ... edge of screen" not respecting "minimum distance" setting

Describe the bug
There appear to be couple of bugs in the "Move mouse [...] edge of screen" triggers. I'll describe each that I've found:

  1. The Minimum distance from edge before triggering setting is not respected for left or right screen edges. To reproduce: set a trigger for Move mouse to left edge of screen and set the Minimum distance from edge before triggering to 150px and save. Display a HUD on trigger. Notice that the HUD only displays when the cursor is exactly at the left edge (or possibly the default 4px setting). This setting IS respected for top and bottom screen edges
  2. The Move mouse away from [...] edge of screen trigger ONLY fires if a matching Move mouse toward [...] edge of screen fires first. To reproduce: Create both a Move mouse toward left edge of screen and Move mouse away from left edge of screen, display HUDs for both. Set the minimum distance to 150px for both. Notice that moving your mouse to the far left edge (see bug #1) triggers the "toward" HUD and moving your mouse back across the 150px threshold triggers the "away" HUD. Now move your mouse close to the left edge, but not close enough to trigger the HUD. Move it back across the 150px threshold and notice that not HUD is triggered. Alternatively, disable or delete the Move mouse TO left edge of screen trigger. Now it is impossible to trigger the Move mouse AWAY from left edge of screen

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):

Basic mouse


Screenshots


Device information:

  • Type of Mac: I've tried on two different MacBook Pros (M3 Pro and M1 Max)
  • macOS version: 26.4 and 26.5.2
  • BetterTouchTool version: 6.872 (latest alpha as of Sept. 30, 2026)

Additional information (e.g. crash logs, related issues, etc.):

Here is a sample configuration that reproduces bug #1:

[
  {
    "BTTLastUpdatedAt" : 1790792054.9848971,
    "BTTTriggerType" : 768,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse To Left Edge Of Screen",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "5130099E-E95E-44D2-ACED-FC1B561FADD5",
    "BTTMoveToLeftScreenEdgeMinDistance" : 150,
    "BTTDelayBeforeTriggering" : 0,
    "BTTAllowDragging" : 1,
    "BTTTriggerOnDown" : 1,
    "BTTOrder" : 0,
    "BTTTriggerConfig" : {
      "BTTHUDText" : "TOWARD",
      "BTTShowHUD" : 1
    }
  }
]

And a sample configuration that reproduces bug #2:

[
  {
    "BTTLastUpdatedAt" : 1790792355.1932189,
    "BTTTriggerType" : 768,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse To Left Edge Of Screen",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "5130099E-E95E-44D2-ACED-FC1B561FADD5",
    "BTTMoveToLeftScreenEdgeMinDistance" : 4,
    "BTTDelayBeforeTriggering" : 0,
    "BTTAllowDragging" : 1,
    "BTTTriggerOnDown" : 1,
    "BTTEnabled2" : 0,
    "BTTOrder" : 0,
    "BTTTriggerConfig" : {
      "BTTHUDText" : "TOWARD",
      "BTTShowHUD" : 1
    }
  },
  {
    "BTTLastUpdatedAt" : 1790792331.631979,
    "BTTTriggerType" : 769,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse Away From Left Screen Edge",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "BEF7D1FF-AAB4-44B4-8176-ECCB8DADCA47",
    "BTTMoveAwayFromLeftScreenEdgeMinDistance" : 150,
    "BTTOrder" : 1,
    "BTTTriggerConfig" : {
      "BTTHUDText" : "AWAY",
      "BTTShowHUD" : 1
    }
  }
]

And here are a few other related reports:

the second one is intentional, the move away triggers always need a "move to" trigger first. However the first issue is definitely a bug, I accidentally applied the chosen value vertically instead of horizontally. Should be resolved in 6.873 (uploading now)

Thanks so much for fixing the first one so quickly! Though it actually appears that away distance may be getting doubled somewhere along the way? If I set it to trigger at 150px, it actually triggers at 300px. Is it adding the to threshold to the away threshold? (Edit: Actually 300px is the maximum you can set the away threshold and that value seems to be used all the time, regardless of the setting)

I also appreciate you letting me know that the second one is intentional. Is there any sort of timeout where the to move would "expire" and no longer trigger the away? With the first issue fixed, I think that should be fine for me. I can't think of a use-case off the top of my head where I would need an away without a to first. Though it may be nice if the UI mentioned this restriction since it was a little confusing why it wasn't working

Ah I think the away setting is a bit confusing. It measures from where the "to" trigger triggered.

That doesn't actually seem to be the case, it seems to be hardcoded to 300px. Can you try this configuration and see if the away triggers at 2px or 300px for you? It triggers at 300px for me:

[
  {
    "BTTLastUpdatedAt" : 1790797060.8250599,
    "BTTTriggerType" : 768,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse To Left Edge Of Screen",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "5130099E-E95E-44D2-ACED-FC1B561FADD5",
    "BTTMoveToLeftScreenEdgeMinDistance" : 1,
    "BTTDelayBeforeTriggering" : 0,
    "BTTAllowDragging" : 0,
    "BTTTriggerOnDown" : 0,
    "BTTOrder" : 0,
    "BTTTriggerConfig" : {
      "BTTHUDText" : "TOWARD 1PX",
      "BTTShowHUD" : 1
    }
  },
  {
    "BTTLastUpdatedAt" : 1790797022.1262679,
    "BTTTriggerType" : 769,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse Away From Left Screen Edge",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "BEF7D1FF-AAB4-44B4-8176-ECCB8DADCA47",
    "BTTMoveAwayFromLeftScreenEdgeMinDistance" : 1,
    "BTTOrder" : 1,
    "BTTTriggerConfig" : {
      "BTTHUDText" : "AWAY 1PX",
      "BTTShowHUD" : 1
    }
  }
]

there is no hardcoded 300px limit, but I think I have an idea how previously saved values can affect this. 6.875 should resolve this as well, uploading now! I am not 100% sure whether this is it because I can't reproduce right now, but I think it might fix it.

Amazing, 6.875 fixes it AND you added a hint explaining the relationship between the to/away!

I had wondered about a 300px hardcoded value because that's where the slider maxes out:

But it does seem like it was more of a "previous stale value" issue as a second computer on 6.873 did not have the 300px issue. Either way, it's working as expected now. Thanks again for fixing this so fast!

Sorry to keep asking questions, but it seems like the to and away triggers still aren't completely reliable - they seem to trigger multiple times, even when the mouse is moving in the opposite direction that should cause a trigger. Here's a brief demo, reproduced on two different computers, both running 6.875

Notice how "Away" can get triggered while the mouse is moving toward the edge, even though it's got a 30px minimum distance, and "To" can get triggered while moving away from the edge

Thanks again for helping!

[
  {
    "BTTLastUpdatedAt" : 1790810810.52511,
    "BTTTriggerType" : 770,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse To Right Edge Of Screen",
    "BTTTriggerTypeDescription" : "Default cursor speed: 0.6897, acceleration: 0.6875",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "F0F83E2E-B629-4414-B1D5-FE8872E2CD61",
    "BTTMoveToRightScreenEdgeMinDistance" : 100,
    "BTTDelayBeforeTriggering" : 0,
    "BTTOrder" : 0,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1790811177.0549979,
        "BTTTriggerParentUUID" : "F0F83E2E-B629-4414-B1D5-FE8872E2CD61",
        "BTTIsPureAction" : true,
        "BTTUUID" : "086EB352-59AD-4B71-A2A2-8860AE7AFBD0",
        "BTTPredefinedActionType" : 254,
        "BTTPredefinedActionName" : "Show HUD Overlay",
        "BTTAdditionalActionData" : {
          "BTTActionHUDBlur" : true,
          "BTTActionHUDHeight" : 220,
          "BTTActionHUDBackground" : "0.000000, 0.000000, 0.000000, 0.000000",
          "BTTActionHUDOffsetY" : 0,
          "BTTIconConfigImageHeight" : 100,
          "BTTActionHUDPosition" : 0,
          "BTTActionHUDDetail" : "",
          "BTTActionHUDDuration" : 0.89999997615814209,
          "BTTActionHUDDisplayToUse" : 1,
          "BTTIconConfigImageWidth" : 100,
          "BTTActionHUDPadding" : 0,
          "BTTActionHUDSlideDirection" : 0,
          "BTTActionHUDHideWhenOtherHUDAppears" : false,
          "BTTActionHUDWidth" : 220,
          "BTTActionHUDAttributedTitle" : "{\\rtf1\\ansi\\ansicpg1252\\cocoartf2869\n\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica-Bold;}\n{\\colortbl;\\red255\\green255\\blue255;\\red0\\green0\\blue0;}\n{\\*\\expandedcolortbl;;\\cssrgb\\c0\\c0\\c0\\c84706\\cname labelColor;}\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\pardirnatural\\qc\\partightenfactor0\n\n\\f0\\b\\fs80 \\cf2 To Right\\\n\n\\fs48 \\{toRight\\}}",
          "BTTActionHUDBorderWidth" : 0,
          "BTTActionHUDTitle" : "",
          "BTTIconConfigIconType" : 1,
          "BTTActionHUDOffsetX" : 0
        },
        "BTTHUDActionConfiguration" : "{\"BTTActionHUDBlur\":true,\"BTTActionHUDOffsetX\":0,\"BTTActionHUDBackground\":\"0.000000, 0.000000, 0.000000, 0.000000\",\"BTTActionHUDOffsetY\":0,\"BTTIconConfigImageHeight\":100,\"BTTActionHUDPosition\":0,\"BTTActionHUDDetail\":\"\",\"BTTActionHUDDuration\":0.89999997615814209,\"BTTActionHUDDisplayToUse\":1,\"BTTIconConfigImageWidth\":100,\"BTTActionHUDPadding\":0,\"BTTActionHUDSlideDirection\":0,\"BTTActionHUDHideWhenOtherHUDAppears\":false,\"BTTActionHUDWidth\":220,\"BTTActionHUDAttributedTitle\":\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\cocoartf2869\\n\\\\cocoatextscaling0\\\\cocoaplatform0{\\\\fonttbl\\\\f0\\\\fswiss\\\\fcharset0 Helvetica-Bold;}\\n{\\\\colortbl;\\\\red255\\\\green255\\\\blue255;\\\\red0\\\\green0\\\\blue0;}\\n{\\\\*\\\\expandedcolortbl;;\\\\cssrgb\\\\c0\\\\c0\\\\c0\\\\c84706\\\\cname labelColor;}\\n\\\\pard\\\\tx560\\\\tx1120\\\\tx1680\\\\tx2240\\\\tx2800\\\\tx3360\\\\tx3920\\\\tx4480\\\\tx5040\\\\tx5600\\\\tx6160\\\\tx6720\\\\pardirnatural\\\\qc\\\\partightenfactor0\\n\\n\\\\f0\\\\b\\\\fs80 \\\\cf2 To Right\\\\\\n\\n\\\\fs48 \\\\{toRight\\\\}}\",\"BTTActionHUDBorderWidth\":0,\"BTTActionHUDTitle\":\"\",\"BTTIconConfigIconType\":1,\"BTTActionHUDHeight\":220}",
        "BTTOrder" : 0
      },
      {
        "BTTLastUpdatedAt" : 1790811177.0549622,
        "BTTTriggerParentUUID" : "F0F83E2E-B629-4414-B1D5-FE8872E2CD61",
        "BTTIsPureAction" : true,
        "BTTUUID" : "7361164F-007D-4A15-9F82-15A08B051A0D",
        "BTTPredefinedActionType" : 281,
        "BTTPredefinedActionName" : "Run Real JavaScript",
        "BTTAdditionalActionData" : {
          "BTTScriptFunctionToCall" : "someJavaScriptFunction",
          "BTTJavaScriptUseIsolatedContext" : false,
          "BTTAppleScriptRunInBackground" : false,
          "BTTScriptType" : 3,
          "BTTActionJSRunInSeparateContext" : false,
          "BTTScriptString" : "\nasync function someJavaScriptFunction() {\n\t\tconst cur = await get_number_variable('toRight');\n        await set_number_variable('toRight', (cur ?? 0) + 1);\n        return '';\n}",
          "BTTAppleScriptUsePath" : false,
          "BTTScriptLocation" : 0
        },
        "BTTGenericActionConfig" : "\nasync function someJavaScriptFunction() {\n\t\tconst cur = await get_number_variable('toRight');\n        await set_number_variable('toRight', (cur ?? 0) + 1);\n        return '';\n}",
        "BTTOrder" : 1
      },
      {
        "BTTLastUpdatedAt" : 1790811177.0550408,
        "BTTTriggerParentUUID" : "F0F83E2E-B629-4414-B1D5-FE8872E2CD61",
        "BTTIsPureAction" : true,
        "BTTUUID" : "B9E5A721-6DEE-40C7-B5CC-3AB3D4ACF9DF",
        "BTTPredefinedActionType" : 559,
        "BTTPredefinedActionName" : "Change Mouse Speed And Acceleration",
        "BTTAdditionalActionData" : {
          "BTTActionMouseSpeed" : 0,
          "BTTActionMouseAcceleration" : 0.68999999761581421
        },
        "BTTEnabled2" : 0,
        "BTTOrder" : 2
      }
    ],
    "BTTGestureNotes" : "Default cursor speed: 0.6897, acceleration: 0.6875",
    "BTTTriggerConfig" : {
      "BTTHUDText" : "To right"
    }
  },
  {
    "BTTLastUpdatedAt" : 1790810873.654125,
    "BTTTriggerType" : 771,
    "BTTTriggerTypeDescriptionReadOnly" : "Move Mouse Away From Right Screen Edge",
    "BTTTriggerTypeDescription" : "Default cursor speed: 0.6897, acceleration: 0.6875",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "6829D7ED-D938-4BDF-8D82-3F37D742CFB3",
    "BTTMoveAwayFromRightScreenEdgeMinDistance" : 30,
    "BTTOrder" : 1,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1790811177.0549901,
        "BTTTriggerParentUUID" : "6829D7ED-D938-4BDF-8D82-3F37D742CFB3",
        "BTTIsPureAction" : true,
        "BTTUUID" : "BF387E62-28FD-44BE-A76C-E9C10A3B7276",
        "BTTPredefinedActionType" : 254,
        "BTTPredefinedActionName" : "Show HUD Overlay",
        "BTTAdditionalActionData" : {
          "BTTActionHUDBlur" : true,
          "BTTActionHUDOffsetX" : 0,
          "BTTActionHUDBackground" : "rgba(0.000000,0.000000,0.000000, 0.000000)",
          "BTTActionHUDOffsetY" : 200,
          "BTTIconConfigImageHeight" : 100,
          "BTTActionHUDPosition" : 0,
          "BTTActionHUDDetail" : "",
          "BTTActionHUDDuration" : 0.89999997615814209,
          "BTTActionHUDDisplayToUse" : 1,
          "BTTIconConfigImageWidth" : 100,
          "BTTActionHUDPadding" : 0,
          "BTTActionHUDSlideDirection" : 0,
          "BTTActionHUDHideWhenOtherHUDAppears" : false,
          "BTTActionHUDWidth" : 220,
          "BTTActionHUDAttributedTitle" : "{\\rtf1\\ansi\\ansicpg1252\\cocoartf2869\n\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica-Bold;}\n{\\colortbl;\\red255\\green255\\blue255;\\red0\\green0\\blue0;}\n{\\*\\expandedcolortbl;;\\cssrgb\\c0\\c0\\c0\\c84706\\cname labelColor;}\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\pardirnatural\\qc\\partightenfactor0\n\n\\f0\\b\\fs80 \\cf2 Away Right\\\n\n\\fs48 \\{awayRight\\}}",
          "BTTActionHUDBorderWidth" : 0,
          "BTTActionHUDTitle" : "",
          "BTTIconConfigIconType" : 1,
          "BTTActionHUDHeight" : 220
        },
        "BTTHUDActionConfiguration" : "{\"BTTActionHUDBlur\":true,\"BTTActionHUDHeight\":220,\"BTTActionHUDBackground\":\"rgba(0.000000,0.000000,0.000000, 0.000000)\",\"BTTActionHUDOffsetY\":200,\"BTTIconConfigImageHeight\":100,\"BTTActionHUDPosition\":0,\"BTTActionHUDDetail\":\"\",\"BTTActionHUDDuration\":0.89999997615814209,\"BTTActionHUDDisplayToUse\":1,\"BTTIconConfigImageWidth\":100,\"BTTActionHUDPadding\":0,\"BTTActionHUDSlideDirection\":0,\"BTTActionHUDHideWhenOtherHUDAppears\":false,\"BTTActionHUDWidth\":220,\"BTTActionHUDAttributedTitle\":\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\cocoartf2869\\n\\\\cocoatextscaling0\\\\cocoaplatform0{\\\\fonttbl\\\\f0\\\\fswiss\\\\fcharset0 Helvetica-Bold;}\\n{\\\\colortbl;\\\\red255\\\\green255\\\\blue255;\\\\red0\\\\green0\\\\blue0;}\\n{\\\\*\\\\expandedcolortbl;;\\\\cssrgb\\\\c0\\\\c0\\\\c0\\\\c84706\\\\cname labelColor;}\\n\\\\pard\\\\tx560\\\\tx1120\\\\tx1680\\\\tx2240\\\\tx2800\\\\tx3360\\\\tx3920\\\\tx4480\\\\tx5040\\\\tx5600\\\\tx6160\\\\tx6720\\\\pardirnatural\\\\qc\\\\partightenfactor0\\n\\n\\\\f0\\\\b\\\\fs80 \\\\cf2 Away Right\\\\\\n\\n\\\\fs48 \\\\{awayRight\\\\}}\",\"BTTActionHUDBorderWidth\":0,\"BTTActionHUDTitle\":\"\",\"BTTIconConfigIconType\":1,\"BTTActionHUDOffsetX\":0}",
        "BTTOrder" : 0
      },
      {
        "BTTLastUpdatedAt" : 1790811177.0551281,
        "BTTTriggerParentUUID" : "6829D7ED-D938-4BDF-8D82-3F37D742CFB3",
        "BTTIsPureAction" : true,
        "BTTUUID" : "CEC2A4A3-0E6A-4EEB-B8D5-E9775E93DF36",
        "BTTPredefinedActionType" : 281,
        "BTTPredefinedActionName" : "Run Real JavaScript",
        "BTTAdditionalActionData" : {
          "BTTScriptFunctionToCall" : "someJavaScriptFunction",
          "BTTJavaScriptUseIsolatedContext" : false,
          "BTTAppleScriptRunInBackground" : false,
          "BTTScriptType" : 3,
          "BTTActionJSRunInSeparateContext" : false,
          "BTTScriptString" : "\nasync function someJavaScriptFunction() {\n\t\tconst cur = await get_number_variable('awayRight');\n        await set_number_variable('awayRight', (cur ?? 0) + 1);\n        return '';\n}",
          "BTTAppleScriptUsePath" : false,
          "BTTScriptLocation" : 0
        },
        "BTTGenericActionConfig" : "\nasync function someJavaScriptFunction() {\n\t\tconst cur = await get_number_variable('awayRight');\n        await set_number_variable('awayRight', (cur ?? 0) + 1);\n        return '';\n}",
        "BTTOrder" : 1
      },
      {
        "BTTLastUpdatedAt" : 1790811177.054981,
        "BTTTriggerParentUUID" : "6829D7ED-D938-4BDF-8D82-3F37D742CFB3",
        "BTTIsPureAction" : true,
        "BTTUUID" : "BA114D4F-9DB9-41B5-AD43-46A36C4EDAAD",
        "BTTPredefinedActionType" : 559,
        "BTTPredefinedActionName" : "Change Mouse Speed And Acceleration",
        "BTTAdditionalActionData" : {
          "BTTActionMouseSpeed" : 0.68970000743865967,
          "BTTActionMouseAcceleration" : 0.68999999761581421
        },
        "BTTEnabled2" : 0,
        "BTTOrder" : 2
      }
    ],
    "BTTGestureNotes" : "Default cursor speed: 0.6897, acceleration: 0.6875",
    "BTTTriggerConfig" : {
      "BTTHUDText" : "Away right"
    }
  }
]

@Andreas_Hegenberg Any chance you've been able to look at this latest report? Thanks!

Sorry, I missed the last post. This should now also be resolved in 6.913 (uploading)

Thanks, I really appreciate how responsive you've been in fixing this! I just tested 6.913 and it looks like these actions are behaving as expected now