[comp.emacs] KEY BINDINGS FOR DEC TERMINALS

stephens@vision1.ai.mit.edu (Prof. Larry Stephens) (03/02/91)

Dear emacs jocks,

We are using emacs exclusively for Lisp programming in my artificial
class.  Is there a way to redefine the escape sequence for emacs.  In our
department, we have many DEC-VT 220 and VT-320 terminals, which not
not have an escape key--we must use the awkward "c-[" sequence.

Also, do you have any suggestions for mapping the VT terminals' up,
down, left, and right keys so that they will work reliably--using them
sometimes adds characters to the buffer ("OA" "OB").  (On the other
hand, I'm using an IBM PC keyboard, with kermit VT-100 emulation, and
everything works just fine.) 

We appreciate any help or suggestions you can offer.

Thanks,

Dr. Larry M. Stephens
Department of Electrical and Computer Engineering
University of South Carolina
Columbia, SC  29208
(803) 777-2895
stephens@ece.scarolina.edu

PS.  Emacs is a wonderful tool.  I'd be lost without it.  I use emacs for
e-mail--it is much better than UNIX mail, and besides I can't stand
vi!

moss_r@summer.chem.su.oz.au (03/29/91)

>
Larry,

In your posting you write:
>Dear emacs jocks,
>
>We are using emacs exclusively for Lisp programming in my artificial
>class.  Is there a way to redefine the escape sequence for emacs.  In our
>department, we have many DEC-VT 220 and VT-320 terminals, which not
>not have an escape key--we must use the awkward "c-[" sequence.
>
>Also, do you have any suggestions for mapping the VT terminals' up,
>down, left, and right keys so that they will work reliably--using them
>sometimes adds characters to the buffer ("OA" "OB").  (On the other
>hand, I'm using an IBM PC keyboard, with kermit VT-100 emulation, and
>everything works just fine.) 

	This might be a bit late, and you might have heard from someone else,
but anyway...


I have been using emacs on a vt320 compatible terminal for well over
10 months ( though my terminal, not being from DEC does have an ESC key ).
In /gnuemacs/lisp/term there are various enteries for different terminals,
including the vt220 series.  Emacs should supposedly recognise what type of
terminal you are on and load this, however you can force it to load the 
appropriate file by putting

(load "/gnuemacs/lisp/term/vt200.el")

in your .emacs file.  This file defines a function enable-arrow-keys () that
sets everything up properly, but isnUt run by default.  It is proberly a good
idea to stick 

(enable-arrow-keys)

at the end of the vt200.el, so that it is run by default.  This function lets
you use the arrow keys, and the function keys ( which you can then define to do
whatever you want ). It also defines the F11 key to be ESC, getting around
the DEC dumboTs not having an excape key.

	If you are interested, I have also written into my .emacs file a sequence that
defines a new keymap that lets you use a GOLD key, that lets any function key
have an alternate GOLD function, as with the DEC EDT/TPU editors ( you can then
map just about every commonly used function onto some sought of function key
sequence, which is a lot easier than having to remember highly forgettable
emacs ctrl and meta key sequences ).  Send me a note if youTre interested.

	Anyway, if you havenUt found all this out already, hope it is of some
help

		Richard Moss
		moss_r@summer.chem.su.oz.au