Custom Overlay to Prevent Accidental Mouse Clicks

I would like to request a new feature in BetterTouchTool (BTT) that allows users to create a custom overlay when using specific triggers, such as Right-Click + Scroll. The primary purpose of this overlay would be to prevent accidental clicks on underlying applications while the trigger is active.

Currently, BTT’s “Drawing Area” for mouse gestures provides a useful overlay that blocks unintended clicks, but this feature is limited to drawing gestures only. I am looking for a similar overlay effect that can be applied to other triggers, like Right-Click + Scroll.

I have tried using AppleScript and JavaScript to create overlays, but these approaches do not prevent mouse interactions with other applications. I believe a built-in feature in BTT that allows users to define a custom overlay for any trigger would greatly enhance usability and flexibility.

I hope you consider adding this functionality to BTT. Thank you for your attention!

You can create a floating menu and configure it to show at your mouse location when needed via the predefined actions "show /hide floating menu". However I'm not yet 100% sure whether I understand your use case :slight_smile:

Thank you for your suggestion! I tried using the floating menu approach as described in the documentation (Starter Template · GitBook), but it doesn’t solve the issue I’m facing.

Here is my use case: I use Right-Click + Scroll to switch tabs, for example, in browsers, Finder, or VSCode. This involves holding down the right mouse button and scrolling to switch tabs. The problem arises when I release the right mouse button after switching to a new tab. The right-click action is inadvertently sent to the newly activated window, resulting in an unintended click in that window.

I posted a video about this a few months ago:

Accidental Right Clicks When Using Scroll Gestures in BetterTouchTool

I'm looking for a solution where the overlay or any other method can prevent the right-click action from being sent to the underlying application when using Right-Click + Scroll gestures. The floating menu doesn't block these interactions, and the accidental clicks still occur.

Mouse gestures have a similar issue, but BTT provides a “Drawing Area” that prevents accidental clicks during gestures. A similar solution for Right-Click + Scroll gestures would be extremely helpful.

Thank you for considering this and for any further suggestions!

Floating menu's will block any interaction if they are visible before your trigger. The question is how would you display such an overlay before you execute the right-click?

Maybe you could use an approach like this? (Show a floating menu when holding right mouse, do a right-click when doing just a short press)

It's challenging to display a floating menu before I press the right mouse button. However, I believe the issue of unwanted clicks happens when I release the right mouse button after holding it down for a gesture. If I hold the right mouse button down for more than a certain amount of time, it indicates that I'm using a mouse-related gesture. Regular mouse clicks are usually very quick, with pressing and releasing happening almost instantly.

I’m not exactly sure how my Windows gesture software prevents accidental clicks, but I did see an option in the settings where I could configure a red dot to appear if I hold the button down for more than, say, 200 milliseconds. This red dot indicates that the mouse gesture won’t be executed, and a normal click will be performed instead.

Currently, my workaround involves:

  1. Pressing the right mouse button, triggering BTT’s drawing area by sliding, scrolling the mouse wheel, and then releasing the right mouse button. This way, I avoid accidental clicks on unintended areas when I release the button.
  2. Moving the mouse to an area where a click won't have any feedback or effect, which is often outside the screen in a browser.

It’s difficult to predict when to display a floating menu before pressing the mouse button, but perhaps showing a floating menu before releasing the mouse button or when the trigger is activated could help prevent accidental clicks.

When the trigger is set to "mouse click + any other action," a floating overlay could be shown simultaneously when such a trigger is activated to prevent accidental clicks. The floating menu settings, such as color and transparency, could simply follow the settings used for the drawing area.

I hope this helps clarify the situation “and provides some insight into a potential solution.

The floating menu you suggested looks cool, but it seems a bit complicated and I haven’t figured out how to trigger it yet. I will continue to explore it.

Thank you for your consideration!

You might need to restart BTT after importing it - afterwards you can trigger it by holding right mouse.

Thank you for your help, but this doesn’t seem to work because the floating menu is clickable. Is there a way to create a non-clickable floating menu?

I was more thinking about using such a floating menu as a replacement of your gestures.

You can open it by long pressing right mouse, keeping it pressed and moving your mouse to one of the items. then release the mouse to trigger the item

One other thing that I might be able to support soon is a "scroll trigger" for floating menu items so that scrolling on them could trigger different actions.

That sounds great! I’m looking forward to the scroll trigger. I tried the click trigger, but it didn’t perform very well.