* Re: VT240 terminal function keys?
1993-09-05 20:34 VT240 terminal function keys? Paul Chen
@ 1993-09-06 3:44 ` Tim Lasko, Digital Equipment Corp., Westford, MA
0 siblings, 0 replies; 2+ messages in thread
From: Tim Lasko, Digital Equipment Corp., Westford, MA @ 1993-09-06 3:44 UTC (permalink / raw)
In article <26digtINNfug@jarrett.crhc.uiuc.edu>, pchen@crhc.uiuc.edu (Paul Chen) writes...
>i've just borrowed an old VT240 terminal for modem use from home
>of course there is no manual supplied....
Sigh. Another paperless piece of hardware...thrown out into the cold.
Help stop this abuse--keep your manuals with your hardware! [end digression]
>i'm looking for information on how to program the function keys...
>...strings that i have to type frequently in order to
>dial-up and login. any clues?
- You can't program PF1 through PF4.
- The only keys which can be programmed are the SHIFTED F6 through F20.
- Programmed definitions aren't stored in non-volatile memory--they go
away if the terminal is turned off.
- This would make it really difficult to use to store dial-in and login
information. (Even ignoring the inherent security risk. But that's another
digression.)
That said, the way to program the shifted function keys is to use the following
command. It is an `escape sequence' that needs to be sent to the terminal by
some means.
<DCS>Pc;Pl|Ky1/St1;...Kyn/Stn<ST>
<DCS> is the Device Control String character (x90), which can also be
represented by <ESC>P (x1B50)
<ST> is the String Terminator character (x9C), which can also be
represented by <ESC>\ (x1B5C)
Pc is either 0 or 1: 0 clears all previous definitions, 1 clears only
the ones you are defining in the command.
Pl is either 0 or 1; 0 locks the keys against further redefinition, 1
resets the lock
Ky1 through Kyn are codes representing the shifted key you want to define.
For esoteric reasons, Shifted-F6 begins with 17, and then each key to the
right is one number higher. (F7 is 18, F8 is 19, and so on.) For another
esoteric reason, you have to count the spaces between the four groups
of keys--the code for F20 is 34.
St1 through Stn are hex-encoded strings of what you want to have the key sent.
This is best explained by example:
HELLO<CR> would be represented as the string "48454C4C4F0D"
(<CR> is Carraige Return)
The "|", "/", and ";" characters shown are required. The "..." indicates
that you can have several pairs of Ky/St in the command.
The following is an example of coding the shifted HELP key to send the
string "HELP!" and the shifted DO key to send "Okay!", each with carraige
returns:
<ESC>P0;0|28/48454C50210D;29/4F6B6179210D<ESC>\
Enjoy.
---
Tim Lasko, Digital Equipment Corp., Westford MA (lasko@regent.enet.dec.com)
Tim Lasko, private citizen (teeml@aol.com)
My opinions are my own; the facts can speak for themselves. I'm on my own time.
^ permalink raw reply [flat|nested] 2+ messages in thread