Search code examples
emacskey-bindings

Is there a way to make <menu> a prefix key in emacs?


I'm trying to get vimish-fold to work, and it does work. The problem is that I want to bind it to the menu key instead of the M key.

(progn
    (define-prefix-command 'my-menu-key-map)
    (define-key vimish-fold-mode (kdb "v f") 'vimish-fold)
    (define-key vimish-fold-mode (kdb "v u") 'vimish-fold-refold)
)

(global-set-key (kdb "<menu>") my-menu-key-map)

I essentially want menu v f -> vimish-fold and menu v u -> vimish-fold-refold. The problem I'm having is it's giving me an error telling me I have the wrong type argument.

Error in private config: init.el, (wrong-type-argument keymapp nil)

Solution

  • You have some repeated typos:

    1. (kdb should be (kbd

    2. (define-key vimish-fold-mode should be (define-key my-menu-key-map