I like Emacs but I hate the default shortcuts. I'm trying to make them more like Sublime Text, Atom, ... Most shortcuts I can change without a problem, but ESC seems to be more difficult. I don't wont to press ESC 3 times or C-g to exit something. Can I remove ESC as a prefix key?

I tried this, but that doesn't work: (global-set-key (kbd "ESC") 'keyboard-escape-quit) It seems to break other shortcuts.

I use Emacs on Ubuntu 16, but I connect from Windows with putty. (I got all the function keys working under putty)

  • Rebinding ESC is generally not a good idea, IMO. It is hard-coded in some cases, among other things. If your main complaint is having to hit C-g or ESC ESC ESC to cancel an action, just what would you like to do instead to cancel an action?
    – Drew
    Aug 5 '16 at 1:58
  • I would like to use ESC (1x) to cancel an action.
    – roeland
    Aug 5 '16 at 2:37
  • Here is a link to something that may interest the original poster -- people of the new generation have a hard time adjusting to the ESC key doing more than one thing, and I struggled with it for at least a year. Stefan wrote up a conditional usage of the ESC key that got me by the first year of using Emacs until I started to appreciate it as a modifier key. stackoverflow.com/questions/20026083/… Now, I have even taken the ESC key a step further by separating it from the Meta key (which is beyond the scope of this thread).
    – lawlist
    Aug 5 '16 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.