Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want avoid using arrow keys for navigation within emacs however due to being an habit its difficult to switch to native key bindings of emacs for navigation. I would rather like to disable arrow keys in order to avoid it completely. How can i disable arrow keys in emacs?

share|improve this question
Disabling cursors is one thing, but doing C-s C-r search style navigation, is better. – Slomojo Dec 30 '12 at 6:19
up vote 6 down vote accepted

Put this Elisp code at the bottom of your ~/.emacs startup file:

(global-unset-key (kbd "<left>"))
(global-unset-key (kbd "<right>"))
(global-unset-key (kbd "<up>"))
(global-unset-key (kbd "<down>"))
(global-unset-key (kbd "<C-left>"))
(global-unset-key (kbd "<C-right>"))
(global-unset-key (kbd "<C-up>"))
(global-unset-key (kbd "<C-down>"))
(global-unset-key (kbd "<M-left>"))
(global-unset-key (kbd "<M-right>"))
(global-unset-key (kbd "<M-up>"))
(global-unset-key (kbd "<M-down>"))

and then restart Emacs. If you don't want to disable the Ctrl (C-)and Alt (M-) variants, just leave those sections out.

share|improve this answer
was very helpful, thanks :) – Idlecool Jun 23 '12 at 20:43

This link is prob also relevant (its what I have just started using):

share|improve this answer
At the moment, this post is essentially only a link. To make sure the answer remains useful even if the link breaks, please edit it to include the relevant information. (Your answer was discovered in an effort to repair or remove old link-only answers.) – Ben N Jan 10 at 5:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .