Article View: gnu.emacs.bug
Article #1184Escape key on VT220
From: Stephen Gildea
Date: Mon, 21 Nov 1988 20:56
Date: Mon, 21 Nov 1988 20:56
24 lines
1350 bytes
1350 bytes
Yes, the VT220 keyboard is poorly designed. Here is a simple fix that will
make ` work as ESC. (I actually use something more complicated that allows
me to run the terminal in VT200 mode.) This code also doesn't allow you to
type C-x ` for C-x ESC (M-x repeat-complex-command). Since C-x ` already
has a binding, I recommend that you put repeat-complex-command on some other
key. I use ESC C-y.
< Stephen
;;; gildea@bbn.com 21 Nov 88
(defun simple-ESC (simple-esc-arg)
"Imitate the Escape key. Not suitable for binding to a keypad key."
(interactive "P")
(setq prefix-arg simple-esc-arg)
(setq unread-command-char ?\e))
(if (string-match "^vt2" (getenv "TERM"))
(progn
;; make ` work like ESC since it stole ESC's place on the keyboard.
;; DEC keyboard design loses again.
;; I don't fix C-x ESC because I use C-M-y instead.
(global-set-key "`" 'simple-ESC)
(global-set-key "\e`" (key-binding "\e\e"))))
Technical Details
Message-ID:
<8811212056.AA00251@prep.ai.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!ALEXANDER.BBN.COM!gildeaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!ALEXANDER.BBN.COM!gildea From: gildea@ALEXANDER.BBN.COM (Stephen Gildea) Newsgroups: gnu.emacs.bug Subject: Escape key on VT220 Message-ID: <8811212056.AA00251@prep.ai.mit.edu> Date: 21 Nov 88 20:56:09 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24