Keyboard navigation for floating menus

As Andreas has mentioned that he would rather have individual tickets than posts on existing ones: I think floating menus are awesome but desperately need keyboard navigation. Specifically, I would love to be able to assign one-letter abbreviations to menus (I think Windows does that in menus). So, something like this:

  • Thingy
  • Howdie
  • Another Item

and if I press T or H or I, it triggers the respective action. Does that make sense?

1 Like

To me that makes sense :slightly_smiling_face: In fact, this is already possible with the Advanced Conditions. If the floating menu (name) is visible, then "T" triggers Thingy. But maybe you can simplify the setup, if this happens directly at the floating menus.

It's a bit complicated because flloating menus usually don't get "keyboard focus".

There are currently two options to achieve this - depending on your use case, both involve a conditional activation group in which you define the keyboard shortcuts you want.

  • Using a conditional activation group with the "hovered_floating_menu_identifier"

  • Using a conditional activation group with the "visible_floating_menu_identifiers"

1 Like

I see. Seems like a sensible approach. Two points, though:

  1. I do not see a variable called 'visible_floating_menu_identifiers'. Was this added in a specific release (I pulled the most recent one from homebrew today)
  2. Is there a canonical way to trigger a menu item? I know I could refactor its actions into a named trigger and trigger that but I hate to scatter logic like that.

1.) Maybe you are looking at the wrong place, this is in the configuration for a conditional activation group:

2.) In v4.172 (uploading now) I have just added a new action "Execute Actions For Existing Configured Trigger", which let's you select the trigger whose actions shall be executed.


Regarding 1: yes, you are right. I was checking in the triggers "advanced conditions". I guess it would be good to keep the lists of conditions consistent between activation groups and advanced conditions.

Regarding 2: Awesome! First class support :slight_smile:

1 Like

I've tried to use it with one of the menus you posted in the other thread, but for some reason it doesn't activate even though he variable visible/hover changes, the condition doesn't turn green like on this screenshot

please use contains instead of "is". "is" would also require the comma after the value.

1 Like

oh, that's very tricky! Thanks

For fun I created a "poor man's" keyboard navigation for the floating menus. :joy:

Assumed the menu is built vertically.

  1. A shortcut opens the menu and moves the mouse to the first button.

  2. "k" moves the mouse down one button. "j" moves the mouse one button up. If you need it, activate key repeat.

  3. Enter (or Space), triggers the macro of the highlighted button and closes the menu.

This just needs a CAG to set the actions of "k", "j" and Enter when the floating menu is open.

1 Like

I like that concept a lot! I took your idea and expanding on it with my menu test that pops up when you hold down command + option:

MouseMenuTest_with_navigation.bttpreset (73.4 KB)

1 Like

@jangelsb I'm afraid the two of us are the only ones who think this is cool. :joy: The "real" keyboard navigation will come. :slightly_smiling_face:

1 Like