[mod.computers.vax] use of VT220 function keys

PORTIA@engvax.UUCP (Portia 616-2635) (09/09/86)

Does anyone know if it is possible to define one of the function keys on the
vt220 to be a Right (arrow) key followed by a DELete key? In particular, I
would like to be able to delete the current character while editing a recalled
DCL command line.

Thanks in advance.

-- Portia Bjorndahl	UUCP -- {allegra|ihnp4}!scgvaxd!engvax!portia
   Hughes Aircraft Co.	ARPA -- engvax!portia@csvax.caltech.edu
   (213) 616-2635

art@MITRE.ARPA (Art McClinton) (09/12/86)

Yes it is easy to define the function keys on a VT220.  However, since
the VT220 can take several modes of operation, I need to define the
assumptions I have made.  1) VT220 is in 7 bit VT220 mode. 2) The Cursor
Key mode is Reset (NORMAL).  Use of eight bit mode or cursor application mode
result in the need of changing the codes loaded.

The right arrow sends CSI C which in 7 bit mode is <esc>[C.

To Load the function keys create a file containing the following
(could be a program containing it but a file can be created just as easily)

<esc>P0;1|23/1B;24/08;25/0A;26/1B5B437F<esc>*

This will
  1) Clear the loaded keys
  2) Load an escape into F11
          a Backspace into F12
          a Linefeed into F13
          the sequuence right arrow, DEL into F14.

Note that the <esc> is only an escape character (1B)
The 0 in P0 says to clear previous key definitions
the 1 says to leave the keys unlocked
The character between 1 and 23 is the vertical bar (shifted \)
The characters between the / and the ;(or ending <esc>) are the Hex
representations of the ascii characters loaded into the key.
		<esc>   -    1B
		  [     -    5B
		  C     -    43
		 DEL    -    7F

All information taken from the VT220 programmers Reference Manual
EK-VT220-RM-002

After creating such a file (1 line), copy it to the terminal (TYPE).
The keys will now be defined.  To use the downloaded key definiton
press shift while striking the function key.
 
- Arthur T. McClinton Jr., (703) 883-6356 
   The MITRE Corporation, Mail Stop Z305
   1820 Dolley Madison Blvd.
   McLean, VA   22102

LEICHTER-JERRY@YALE.ARPA (09/20/86)

    Does anyone know if it is possible to define one of the function keys on
    the vt220 to be a Right (arrow) key followed by a DELete key? In
    particular, I would like to be able to delete the current character while
    editing a recalled DCL command line.
Can't be done.  Intra-line editing is done by the terminal driver, which
hands the result over to DCL.  Key definitions are made and interpreted by
DCL, way too late for line-editing characters to be noticed.

An alternative is to use the UDK (User Defined Keys) feature of the VT220.
You can define the shifted function keys to send any sequence of characters
at all.  VMS can't tell whether those characters came from direct typing or
from the key definitions, so inserting RightArrow/DELETE as the UDK definition
should work just fine.
							-- Jerry
-------