Any way to pop open a dopus menu (static, dynamic, context, anything) from a Global hotkey?

I've tried a number of combinations.
I can easily set a hotkey for a specific menu that's local to a lister and that works just fine.

Just wondering if there's a way to display a menu from a GLOBAL hotkey?

You can run the Toolbar command on a hotkey, and that can open a toolbar as a floating menu (STATE=floatactive).

Scripts can also create custom pop-up menus, which may be better, depending on what you want to run.

Hi Leo

You are correct. The float active, combined with setting the label to the right of the button will display it, and with toggle, I can make it go away.

So then the issue is, is there any way to automatically "hide" or close the toolbar once you pick something or escape out of it?

Maybe scripting would be the way to go.

What I'm looking for really is a way to Pop a menu of "shortcuts" from anywhere (hence a global hotkey), that will then automatically close on selection of an item or if I just press ESCAPE to back out.

When opening the menu with the Toolbar command, you can use the AUTOCLOSE argument to make it close automatically after the first selection:

(I forgot we added this earlier!)

I have made a popup menu/box that opens when I hold CTRL and press the right mouse button.

  1. First you create a toolbar with your buttons.
  2. Also create a button where you can close it easily without selecting anything. Toolbar Popup CLOSE
  3. Set a global hotkey that runs this command:
    In my case Ctrl + Alt + å
    Toolbar "Popup" STATE=float TOGGLE AUTOCLOSE POS=mouse

Dopus does not support hotkey with the mouse, so to be able to use the mouse to open the toolbar, I use Autohotkey v.2 and put this code in a new script: ^!RButton::^!å

My popup toolbar look like this:


Nice! I love your icons.

Still, I was hoping to stay with just Dopus. Mainly because that way, it's simple to backup all the configuration and restore it if necessary. Just one less piece of the puzzle....

If you only use the keyboard to make a hotkey then you can just use Dopus, it's only if you want to use a mouse too the hotkeys you need Autohotkeys too.

The style of the icons is called Doodle and can be found here: Doodle symbols and icons in Doodle Style, PNG, SVG

Ok. A little closer. The Autoclose works perfectly.

Only two things missing

  1. pressing the hotkey displays the toolbar, but at this point, if I want to HIDE the toolbar, It'd be nice to be able to just press ESCAPE. That doesn't seem to work.
  2. even using the active keyword, the toolbar doesn't seem to "have focus", ie pressing up down etc, doesn't appear to navigate within the toolbar

You can add FLOAT=active to make it active, then you put esc on your close button that you created in your toolbar.
Toolbar "Popup" STATE=float TOGGLE AUTOCLOSE POS=mouse FLOAT=active
Now that it becomes active, you can use the hotkey that you set for a button. For example F for firefox


I don't know how to do it if you want to use tab to step between the buttons in the toolbar, but it probably works somehow.

Fantastic! Your suggestion about putting a Close button with a hotkey of ESCAPE did the trick for letting escape close the popup menu.

So the only thing left is keyboard nav (using up-down-left-right to select an item in the toolbar)

My command to display the toolbar looks like this.

Toolbar NAME="Start Button" FLOAT=toplevel,hotkeys,active,vertical POS=mouse AUTOCLOSE

I've tried adding


as well, but still no dice. It's as if the toolbar doesn't have focus when it's displayed, so keystrokes don't register in it.

My toolbar is active with FLOAT=active. Doesn't yours become active? Try removing the other arguments in FLOAT and see if that works better. STATE=floatactive should be the same as FLOAT=active STATE=float

Yeah, it's odd. It's "active" in that it comes up and I can click on it and the buttons work.

And now, with a Close button and ESCAPE as the hotkey, pressing esc will close the toolbar, but otherwise, dead, no keystrokes register to move among the toolbar items.

I can put other buttons on the toolbar and set hotkeys for them and the button will click when I press that assigned hotkey, but that's it.

Floating toolbars don't take input focus, so they can't be used via the keyboard (except hotkeys, which become system-wide).

If you want something that's more like a pop-up menu of shortcuts that can be driven via cursor keys + enter, and opened via a hotkey, then the scripting pop-up menu method is probably the best bet.

The Dialog object can be used to create standard pop-up menus which the script can populate and react to. Or you could use it to create a custom dialog that acts as a launcher in other ways (and can be driven via keyboard).

Ah. That would explain it then.

I'll look through the docs on scripting a popup menu.