Binding special keys in emacs

Like any Emacs user I have some custom keybindings for the common actions I do everyday. Some of the bindings are easy to find but today I specificity wanted a new keybinding to use the “up” arrow.

After some trial and error, I found this works perfectly:

(global-set-key (kbd "<f9> <up>") 'planner-move-up)
(global-set-key (kbd "<f9> <down>") 'planner-move-up)

Don’t forgot the quote before the Emacs function name. You want to bind the function, not the result of the function to the keybinding.

Eric Davis

One comment

  1. Tod says:

    um, I think I will need it in the nearest future, I’m not a emacs user yet, but I want to try it. Is there some good advices for “fresh” ones like I am?

Comments are closed.