I am looking for a compact way to store a lot of shortcut key bindings. This is my current idea, for which I'm looking for help how to add this into my Emacs config:

I would like to make F9 "my" key, that opens up a hierarchical menu of (global) key bindings.

When pressing F9, I'd like a submenu to open that shows e.g.:

o - org-mode submenu
a - show org-mode agenda
w - org-wiki submenu
b - org-brain submenu

If I press F9-a, I'd like to directly execute the M-x org-agenda command.

But by pressing F9-w, I get a new submenu opened that e.g. shows this:

# Org-wiki submenu
i - Show Wiki index
n - Add new Wiki page

If my final keystroke sequence is F9-w-i, I want the command M-x org-wiki-index executed.

  • Does something like this exist already?
  • Is there a better solution?
  • If no, how would I add something like this in my emacs config?

/Edit: I think what I want is to write my custom version of the M-x org-agenda command.


2 Answers 2


As @icarus suggested, hydra is the way to go here. Check out my solution that is similar to what you want here: https://github.com/jkitchin/scimax/blob/master/scimax-hydra.el

there are submenus of keys that open new hydras. I have mine bound to f12, and then remapped caps lock to be f12. It is convenient for me.

  • Thanks! I'm actually using it for org-ref now, so double-thanks :) Then org-wiki and/or org-brain. Commented Nov 4, 2018 at 17:47

If you install and enable which-key then Emacs will do that (albeit with more compact formatting) for every prefix binding, including your custom ones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.