Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 3 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
add comment

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

http://danamlund.dk/emacs/no-easy-keys.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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