Floating Menu Alpha Development Thread

With version 4.168 clicking outside the Floating Menu sometimes isn't hiding the window, even though I have that option enabled. It mostly works, though.

can you recognize a pattern on when it doesn't work?

I'll try paying special attention from now on and will report back.

Ok, reproduced. It was as easy as having a Safari window on and calling the floating menu with my key combination and then hiding the floating menu with that combination. After I showed back the floating menu, there was no way to turn it off by clicking outside that menu window. The only way to turn it off was with the key combination. Logs attached.
BetterTouchToolDebug.zip (2.1 MB)

thanks! That should be easy to fix

1 Like

Hey, I’ve been playing around with these a bit, and I have a few questions/requests.

  1. Keyboard Navigation - I’d like arrow key grid navigation specifically, I’ve got this working with the Floating Webviews as seen in the preset I uploaded here. I’m wondering if the same thing will be possible in the Floating Menus? Ideally, I’d like to avoid setting up individual keyboard shortcuts with conditional activation groups as was mentioned here.

  2. Overshooting Buttons - A button keeping focus/hover even when I move the mouse past it, makes it possible to move very fast with the mouse. This would mostly make sense with the buttons on the outer edges of a button grid. I’ve got this working in the Webview preset I linked above, so I’m also wondering if this will be possible in the Floating Menus. (I’ve worked around this for now by having giant buttons that are hard to overshoot as seen in the image/video below. This works pretty well, but I’d rather not have ginormous buttons if at all possible.)

  1. Formatting Options - the ability to change hover color for text, SF Symbols…etc. in the BTT UI.

Keyboard Navigation is the thing I care about the most, I would probably switch to the Floating Menus immediately if it were possible.

Either way these menus are looking extremely promising, I’ll have to experiment some more.

Keyboard Navigation
The problem with keyboard navigation is, Floating Menus usually never get keyboard focus so they don't interfere with the actually active application (unless a textfield or something like it is clicked inside of them). However this is definitely planned and there are a few options (if you can think about any other please let me know):
• Allow keyboard navigation while the mouse hovers the menu
• Allow keyboard navigation once activated via some trigger
• Have an option to gain keyboard focus when showing the menu via an action
• Catch all arrow keys while a floating menu is visible and use them to navigate. If multiple menus are open, it would need some priority setting.

Maybe this can be continued here: Keyboard navigation for floating menus - #6 by little-big-h

Overshooting buttons:
•This should be doable, I'll have a look :wink:

Formatting Options:
• I think I don't want to offer a full text formatting alternative for hover, but I can offer a hover color that then applies to the entire text
• Hover color for SFSymbols will be added with the next version

1 Like

Nice, good to hear that it’s planned. I think these options you’ve listed would probably cover most of what I’d want to do. I’ll add any of my future keyboard comments to the thread you linked.

I don’t know if you’d consider this keyboard related, but one other thing is:
In my webview preset I found 2/3 finger swipes as arrow keys, to be a nice way of navigating the the button grid. A 2 finger swipe up would be up arrow for example, and when combined with haptic feedback from the trackpad this was a very cool way to navigate the grid.
Adding the option to disable scrolling in the Floating Menus might be helpful for this type of swipe gesture grid navigation. In that case I wouldn’t want my 2 finger swipes to cause the Floating Menu to scroll.


This sounds good to me, I think hover color for text and SF Symbols will be enough for most (possibly all) of the things I’d want to do. Also, being able to do it directly in the BTT UI will feel like a minor miracle compared to editing html/css/javascript with the webviews. Looking forward to it, Thanks!


Any ideas why bard.google.com doesn't render in the webview, btw?

They seem to do some checks based on the user agent and use chrome specific API if they don't detect the 100% matching safari agent. Try to set the Safari User agent in the webview settings:

Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

I think I'll make this the default.

Amazing, it worked!!

Now the next thing I'd like to have is to be able to define separate User-Agent settings per "item" because I use the "Load new HTML or URL For Web View Menu Item" action to use a separate Web item to load content on button click (same as your browser example).

One more thing - Are you able to "cache" the current state of the floating menu in the sense that I can continue working on the same browser "tab" after I show it (with my keybinding)? I use "Toggle Floating Menu Hidden/Shown". It did work that way before I added my custom "tabs" thing.

What is the way to make this window appear on front only on mouse hover?

can you explain your usecase? Where will your mous be over?

1 Like

Yes, so I'd like to open a floating menu that'd initially be in the foreground, but when I press outside of it, I'd like it to move to the background, eg. behind my Safari window (I'm using Stage Manager). From then on if I hovered that floating menu, I'd like it to get to the foreground so I can fully see its contents.

May I ask a probably stupid question? What could I do with a "Textfield Item" in a floating menu?

enter text which can be accessed from a script, e.g. like in the mini browser example, which uses a textfield for entering urls: share.folivora.ai

@mkozjak menus can only react to hover if you are actually hovering them, I think I can't change that. You can set a small & transparent unhovered size, which expands on hover (like in the mini emoji menu example on https://share.folivora.ai

1 Like

@Andreas_Hegenberg Thanks! Btw, any thoughts on my questions Re: caching the state of all my tabs in a "browser" and also set User-Agent per "item"?

Does the Safari user agent not work for all your use cases? I can post a script to update the user agent of a webview item dynamically, but are you sure you need this?

If you check the "keep active in background" option, it should not reload the default when showing it again - basically keeping the last one active:

Here is an Apple Script to load a specific URL and at the same time update the user agen:

tell application "BetterTouchTool"
	update_menu_item "AA101043-441B-4F3E-8638-98ABFF10377A" json "{ BTTMenuItemText: 'https://google.com', BTTMenuItemUserAgent: 'some website specific user agent'  }"
end tell

Yeah, for Bing Chat I need to use the Microsoft Edge User-Agent. Safari for the rest. Thanks for the tip!