[comp.terminals] ESC key on VT200 and VT300 terminals.

ak104@cleveland.Freenet.Edu (Robert Clark) (04/18/91)

  Does anyone know why DEC on VT200 and 300 terminals
mapped the ESC key to CTRL-3 and CTRL-3 to the ESC key?
  I use the EMACS editor, which is a very popular editor
for mainframe computers, and it requires the use of the
ESC key. It's rather annoying to have to hit CTRL-3 for 
the ESC key, particularly when there's no logical reason
why it should be that way.
  I could map the ESC key back to itself but I use other
terminals such as vt100 and AMIGAS, PC'S, and MACINTOSHES
and it would be a major pain to have to map or de-map
the key depending on what term I'm using everytime I
log on.
  What's the deal here?



					Bob Clark
					SUNY at Albany

davis@pacific.mps.ohio-state.edu ("John E. Davis") (04/18/91)

In article <9104172248.AA10611@cwns9.INS.CWRU.Edu> ak104@cleveland.Freenet.Edu (Robert Clark) writes:
[...]
           I could map the ESC key back to itself but I use other
           terminals such as vt100 and AMIGAS, PC'S, and
           MACINTOSHES and it would be a major pain to have to map
           or de-map the key depending on what term I'm using
           everytime I log on.  What's the deal here?

Just use ^[ for escape-- it always works on any terminal by definition.
--
John

  bitnet: davis@ohstpy
internet: davis@pacific.mps.ohio-state.edu

gwyn@smoke.brl.mil (Doug Gwyn) (04/19/91)

In article <9104172248.AA10611@cwns9.INS.CWRU.Edu> ak104@cleveland.Freenet.Edu writes:
>  What's the deal here?

The deal is that when the first VT2xx models were designed, DEC opted
to follow some European "ergonomic keyboard standard".  As a result,
the VT220 keyboard is without doubt one of the worst I have ever
encountered.  The VT100 was one of the best.  By the way, DEC seems
to have established over a half dozen "DEC keyboard standards" during
the days when I was still paying any attention to what DEC was doing.

gwyn@smoke.brl.mil (Doug Gwyn) (04/19/91)

In article <DAVIS.91Apr17212532@pacific.mps.ohio-state.edu> davis@pacific.mps.ohio-state.edu  (John E. Davis) writes:
>Just use ^[ for escape-- it always works on any terminal by definition.

While that probably works on most ASCII terminals, it is not that way
"by definition", but rather a side effect of the implementation of the
control-key function on such terminals.

pha21@seq1.keele.ac.uk (Braham Levy) (04/19/91)

In article <9104172248.AA10611@cwns9.INS.CWRU.Edu>, ak104@cleveland.Freenet.Edu (Robert Clark) writes:
> 
> 
>   Does anyone know why DEC on VT200 and 300 terminals
> mapped the ESC key to CTRL-3 and CTRL-3 to the ESC key?

am i mistaken or doesn't the F11 key generate ESC ???

braham

email: brahamlevy@uk.ac.keele (or similar)

mail-mail :				phone +44-782-621111x3943
j braham levy
UDSP Lab,
Electrical Engineering Group,
Dept. of Physics,
University of Keele,
Keele, Staffs, 
UK.

phys169@csc.canterbury.ac.nz (04/22/91)

In article <1095@keele.keele.ac.uk>, pha21@seq1.keele.ac.uk (Braham Levy) writes:
> In article <9104172248.AA10611@cwns9.INS.CWRU.Edu>, ak104@cleveland.Freenet.Edu (Robert Clark) writes:
>> 
>> 
>>   Does anyone know why DEC on VT200 and 300 terminals
>> mapped the ESC key to CTRL-3 and CTRL-3 to the ESC key?
> 
> am i mistaken or doesn't the F11 key generate ESC ???
> 
Sometimes. On terminals like the Wyse 99 (with a VT-style keyboard) it is
labelled as ESC as well as F11, and produces an Escape when in VT100 mode. In
VT200 mode you have to program the key to generate ^[ instead of the ^[ [ 23 ~
it produces by default (send ^[ P 1 ; 0 | 4 3 / 1 B ^[ \ to redefine F11
correctly). Note that ^[ means Control-[, and spaces are added for clarity here
but shouldn't be sent to the terminal. I haven't got a VT200 handy to try it
on, but (barring typos) it should work okay.

The stupidity of the VT200 keyboard design is equalled only by the use of
Ctrl-S in EMACS for searching.  If you run DEC-type keyboards with EMACS, check
that you've got the appropriate lisp tailorings to take adavantage of it, for
example, you should be getting the HELP and FIND keys to work as expected. 

Hope this helps,
Mark Aitchison, Physics, University of Canterbury, New Zealand.

frank@urz.unibas.ch (04/22/91)

In article <9104172248.AA10611@cwns9.INS.CWRU.Edu>, ak104@cleveland.Freenet.Edu (Robert Clark) writes:
> 
> 
>   Does anyone know why DEC on VT200 and 300 terminals
> mapped the ESC key to CTRL-3 and CTRL-3 to the ESC key?
>   I use the EMACS editor, which is a very popular editor
> for mainframe computers, and it requires the use of the
> ESC key. It's rather annoying to have to hit CTRL-3 for 
> the ESC key, particularly when there's no logical reason
> why it should be that way.
>   I could map the ESC key back to itself but I use other
> terminals such as vt100 and AMIGAS, PC'S, and MACINTOSHES
> and it would be a major pain to have to map or de-map
> the key depending on what term I'm using everytime I
> log on.
>   What's the deal here?
> 
> 
> 
> 					Bob Clark
> 					SUNY at Albany

As others have noted: ^[ is also ESC on DEC keyboards. But much the same pain
as ^3.

On the vt3xx series you can change the keyboard layout a little putting the
ESC key back to a position more common. On US-keyboards it's the ~, key. It can
be remapped to ESC. The ~ can be moved to another key, the <>; and those back
to the positions above the , and . keys. Great isn't it?

 .____________________________________________________________________________.
 |                                                                            |
 | _____   __  _____       Robert Frank                                       |
 |   |    /      |         Institut fuer Informatik                           |
 |   |    |      |         University of Basel, Switzerland                   |
 |   |   -+-     |                                                            |
 |   |    |      |         Mittlere Strasse 142                               |
 | __|__  |    __|__       CH-4056 Basel                                      |
 |                                                                            |
 | frank@urz.unibas.ch     tel. + (061) 321 99 67    fax + (061) 321 99 15    |
 |____________________________________________________________________________|

bill@bilver.uucp (Bill Vermillion) (04/23/91)

In article <15892@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:

>In article <DAVIS.91Apr17212532@pacific.mps.ohio-state.edu> davis@pacific.mps.ohio-state.edu  (John E. Davis) writes:

>>Just use ^[ for escape-- it always works on any terminal by definition.
 
>While that probably works on most ASCII terminals, it is not that way
>"by definition", but rather a side effect of the implementation of the
>control-key function on such terminals.

Why do you say that it is not that way by definition.  I understood the
"definition" is that the Control key is just to strips the 3 most significant
bits, therefore control [ will always give ESC.

I have seen some crude terminal emulators that subtract from the ascii
value instead of masking  but that gives differnent values for control chars.
eg: ctl A and ctl a map differently that way.  But I HAVE seen that done.

-- 
Bill Vermillion - UUCP: uunet!tarpit!bilver!bill
                      : bill@bilver.UUCP

brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (04/23/91)

In article <1991Apr22.155857.500@csc.canterbury.ac.nz> phys169@csc.canterbury.ac.nz writes:
> The stupidity of the VT200 keyboard design is equalled only by the use of
> Ctrl-S in EMACS for searching.

Failing to figure out exactly what keys users will want isn't stupid;
it's just a mistake. What's stupid is a convention that codes keystrokes
as ambiguous byte streams. When the receiving end has to pay attention
to timing to figure out whether you typed esc-[-A or esc [ A, the
keyboard model is simply flawed, and this is reflected by unreliable
software and user complaints.

In a better world, no valid keystroke would produce a prefix of what
another valid keystroke produces.

---Dan

gwyn@smoke.brl.mil (Doug Gwyn) (04/25/91)

In article <1991Apr23.054148.3339@bilver.uucp> bill@bilver.uucp (Bill Vermillion) writes:
>Why do you say that it is not that way by definition.  I understood the
>"definition" is that the Control key is just to strips the 3 most significant
>bits, therefore control [ will always give ESC.

No, there is no such definition for the function of the "control" modifier
key on a keyboard.  While virtually all ASCII terminal keyboards apply the
control key as you describe for the ALPHABETIC characters, there is
considerable variation in the control+special_character mappings use to
produce other ASCII codes, such as NUL, DEL, FS, GS, and perhaps ESC.
Some terminals function as you described and others map these differently.

jerrells@silver.ucs.indiana.edu (Joby Jerrells) (04/26/91)

In article <1095@keele.keele.ac.uk> pha21@seq1.keele.ac.uk (Braham Levy) writes:
>In article <9104172248.AA10611@cwns9.INS.CWRU.Edu>, ak104@cleveland.Freenet.Edu (Robert Clark) writes:
>> 
>> 
>>   Does anyone know why DEC on VT200 and 300 terminals
>> mapped the ESC key to CTRL-3 and CTRL-3 to the ESC key?
>
>am i mistaken or doesn't the F11 key generate ESC ???
>
>braham
>
>email: brahamlevy@uk.ac.keele (or similar)
>
>mail-mail :				phone +44-782-621111x3943
>j braham levy
>UDSP Lab,
>Electrical Engineering Group,
>Dept. of Physics,
>University of Keele,
>Keele, Staffs, 
>UK.

To: ak104@cleveland.Freenet.Edu
Subject: Re: ESC key on VT200 and VT300 terminals.
Newsgroups: comp.terminals
In-Reply-To: <9104172248.AA10611@cwns9.INS.CWRU.Edu>
Organization: Indiana University, Bloomington

In article <9104172248.AA10611@cwns9.INS.CWRU.Edu> you write:
>
>  Does anyone know why DEC on VT200 and 300 terminals
>mapped the ESC key to CTRL-3 and CTRL-3 to the ESC key?
>  I use the EMACS editor, which is a very popular editor
>for mainframe computers, and it requires the use of the
>ESC key. It's rather annoying to have to hit CTRL-3 for 
>the ESC key, particularly when there's no logical reason
>why it should be that way.
>  What's the deal here?
>
>					Bob Clark
>					SUNY at Albany

On the DEC vt200 series of terminals the escape key is mapped to F11.
These terminals have a set-up mode (The F3 key) that will allow you to
emulate a vt100 keyboard.  Then, whenever you need to use the escape
key in emacs, just press the F11 key as if it were the escape key.  I'm
not positive about the vt300 series, I'd have to check, but my guess is
that they work in a similar manner.  One other hint, make sure that you
define vt100 for emacs.
-- 
--------------------------------------------------------------------
     Joby Jerrells                |       ---->    My opinion
  -Indiana University-            |       <----    Not their's
--------------------------------------------------------------------
--
--------------------------------------------------------------------
     Joby Jerrells                |       ---->    My opinion
  -Indiana University-            |       <----    Not their's
--------------------------------------------------------------------

leilabd@syma.sussex.ac.uk (Leila Burrell-Davis) (04/30/91)

jerrells@silver.ucs.indiana.edu (Joby Jerrells) writes:
> On the DEC vt200 series of terminals the escape key is mapped to F11.
> These terminals have a set-up mode (The F3 key) that will allow you to
> emulate a vt100 keyboard.  Then, whenever you need to use the escape
> key in emacs, just press the F11 key as if it were the escape key.  I'm
> not positive about the vt300 series, I'd have to check, but my guess is
> that they work in a similar manner.

I'm quoting from the DEC publication 'Installing and Using the VT320
Video Terminal'.

    F11 is a function key often defined by application software. In
    VT100 and VT52 modes, F11 sends an escape (ESC) character.

However, from the Keyboard setup screen, it is possible to change
the characters that a number of keys send. One of these is the `~
key (above the TAB and to the left of 1), which can be set to send
an escape. It is sensible if you do this also to set the <> key to
send ~` and the ,, and .. keys to send ,< and .> This is what I do
when I use a vt320.

Leila
-- 
Leila Burrell-Davis, Computing Service, University of Sussex, Brighton, UK
Tel:   +44 273 678390              Fax:   +44 273 678470
Email: leilabd@syma.sussex.ac.uk  (JANET: leilabd@uk.ac.sussex.syma)