Skip to main content
added 4 characters in body
Source Link
clemera
  • 3.5k
  • 15
  • 41

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.

Edit to improve the answer according to the comments:

If you want to keep the ESC key functionality, you can do   

(define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))

One thing to note is that if Emacs hangs you still have to use the C-g key for some reason, but that happens rarely.

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.

Edit to improve the answer according to the comments:

If you want to keep the ESC key functionality, you can do  (define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))

One thing to note is that if Emacs hangs you still have to use the C-g key for some reason, but that happens rarely.

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.

Edit to improve the answer according to the comments:

If you want to keep the ESC key functionality, you can do 

(define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))

One thing to note is that if Emacs hangs you still have to use the C-g key for some reason, but that happens rarely.

added 251 characters in body
Source Link
clemera
  • 3.5k
  • 15
  • 41

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.

Edit to improve the answer according to the comments:

If you want to keep the ESC key functionality, you can do (define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))

One thing to note is that if Emacs hangs you still have to use the C-g key for some reason, but that happens rarely.

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.

Edit to improve the answer according to the comments:

If you want to keep the ESC key functionality, you can do (define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))

One thing to note is that if Emacs hangs you still have to use the C-g key for some reason, but that happens rarely.

Source Link
clemera
  • 3.5k
  • 15
  • 41

You can do (define-key key-translation-map (kbd "ESC") (kbd "C-g")). I did the same a long time ago and had no problems.