[comp.terminals] pf keys on vt100

gordon@ug.cs.dal.ca (Scott King) (05/26/91)

  What are the keys marked PF1, PF2, PF3, and PF4 for on the vt100?  I assume
they are programmable keys.  If they are, how do I program them?  I am using
Vax VMS on one account and UNIX on the other so I need how to do it with both
operating systems if it's different for each one.

Thanks,
   Scott King
   gordon@ug.cs.dal.ca

cepek@vixvax.mgi.com (05/28/91)

In article <1991May26.141743.2480@cs.dal.ca>,
gordon@ug.cs.dal.ca (Scott King) writes:

>What are the keys marked PF1, PF2, PF3, and PF4 for on the vt100?

They are "for" whatever an Application wants to use them for.  (Not 
entirely unlike "a hole is to dig".  :-)


> I assume they are programmable keys.  If they are, how do I program them?

They are not programmable in the sense of many, "more modern", terminals 
(such as this WYSE-85 I am typing on), that is, you cannot tell the 
_terminal_ to redefine the characters that certain keys generate.  With
a VT220 class terminal (or beyond) you _can_ redefine the characters that
the F6 thru F20 (shifted) keys generate (like the answerback).  (This
WYSE "improves" on this by allowing the unshifted versions to be 
redefined as well, but again, I digress...)


> I am using Vax VMS on one account and UNIX on the other so I need how to
> do it with both operating systems if it's different for each one.

What you want to use on VMS is the DEFINE/KEY command.  This tell VMS
to map a key to a string of characters that you pick (it does not 
reprogram the keys within the terminal).  Some examples:

$ define/key  PF1  "SHOW TIME"/erase/terminate
$ define/key  PF2  "/CONFIRM"
$ define/key  PF4  ""/erase      ! This erases the current line, like ^U

Here are the handiest qualifiers:
/nolog      means "don't tell me you just programmed the key"
/erase      means "trash any current line and start over with this"
/noecho     means "don't display what this key does when I press it"
/terminate  means "pretend that I press [RETURN] after this one"

Also:  "DELETE/KEY keyname"  undoes a key definition.
       "SHOW KEY/FULL keyname"  displays a key's definition, and
       "SHOW KEY/ALL/FULL"  displays all current key definitions.

To get more information, just type:  HELP DEFINE /KEY  and use the 
on-line help of VMS to tell you more (and there are ALOT more 
capabilites).  Experimenting at a VMS prompt is good way to start.
Once you know what you want, you can add those lines to your SYS$LOGIN:
LOGIN.COM file (probably adding the /nolog qualifier).

Have fun, Scott.

P.S.  My limited Unix experience doesn't allow me to address that 
portion of your question... someone else?

 ,---------------------------------,___________________________
/  Mike Cepek, Programmer/Analyst / Internet: CEPEK@MGI.COM   /
\  Management Graphics, Inc.      \    Voice: +1 612/851-6112 \  "Engage."
/  1401 East 79th Street          / Operator: +1 612/854-1220 /
\  Minneapolis, MN  55425  USA    \      Fax: +1 612/854-6913 \
 `--------------------------------/___________________________/