From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,7d339854b24c37ec,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-09-06 22:02:11 PST Newsgroups: comp.sys.dec Path: gmd.de!dearn!frmop11.cnusc.fr!univ-lyon1.fr!scsing.switch.ch!xlink.net! sol.ctr.columbia.edu!usc!elroy.jpl.nasa.gov!ames!decwrl!pa.dec.com!sousa.ako.dec.com!nntpd.lkg.dec.com!regent.enet.dec.com!lasko From: lasko@regent.enet.dec.com (Tim Lasko, Digital Equipment Corp., Westford, MA) Subject: Re: VT240 terminal function keys? Message-ID: <1993Sep6.030746.355@nntpd.lkg.dec.com> Sender: usenet@nntpd.lkg.dec.com (USENET News System) Organization: Digital Equipment Corporation References: <26digtINNfug@jarrett.crhc.uiuc.edu> Date: Mon, 6 Sep 1993 03:44:52 GMT 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. Pc;Pl|Ky1/St1;...Kyn/Stn is the Device Control String character (x90), which can also be represented by P (x1B50) is the String Terminator character (x9C), which can also be represented by \ (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 would be represented as the string "48454C4C4F0D" ( 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: P0;0|28/48454C50210D;29/4F6B6179210D\ 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.