.XLOWER .LM 5 .RM 80 .JUSTIFY .NOHEADER .FIGURE 26 .CENTER 82 INSTRUCTIONS TO INSTALL KEY DEFINITION UTILITIES .SKIP 1 .CENTER 82 by .SKIP 1 .CENTER 82 Robert L. Hays .PAGE .CHAPTER UTILITIES USING THE "DEFINE/KEY" DCL COMMAND .LM 5 .RM 80 The DEFINE/KEY command defines keypad and function keys on VT-style terminals to DCL-executable strings. A great many things can be done with this, but included here is a set of utilities to get you started. .SKIP 1 APPLICATION.COM toggles a VT2xx keypad mode from application to numeric and back. @APPICATION A sets the keypad to application mode, and @APPLICATION N sets numeric mode. @APPLICATION without a command qualifier toggles the keypad mode. The keypad must be in application mode to use keys defined on them. As an added note, the keypad mode is not save-able in the SETUP functions, and EDIT and other products have, as a "feature", a reset to numeric mode for the terminal. Therefore, I have included EDT_START.COM, which I define as symbol EDT in my startup file. This command file resets the terminal to application keypad mode when editting is done. .SKIP 1 I recommend setting one of the PF keys to do @APPLICATION A, so that if you should find yourself in numeric keypad mode, you can get back painlessly. .SKIP 1 The logical symbol DEFINE_KEYS must point to a file that will define your keys. This file will be a command file, and can be executed inside your LOGIN.COM file. I have included my file, DEFINE_KEYS.COM, and a help file, KEYPAD.HLP, that contains the keypad definition that results. You will notice that I define the help key to show a local help library. I load KEYPAD.HLP there. This way I can read my key definitions easily. .SKIP 1 The command file CHANGE_KEY_DEF.COM is a simple interface to the DEFINE/KEY utility, allowing key definitions to be added to the DEFINE_KEYS file and/or executing the DEFINE/KEY command. .CHAPTER STICKING TEXT INTO YOUR VT2xx KEYS .LM 5 .RM 80 Someone at a MIVAX meeting wanted to push text into the VT2xx keys. This can be done, as evidenced by VT200SET, a MACRO-11 program written by Mark Northrup. LOADTXT.COM is a command file implementation of this. .SKIP 1 The general idea is to set up a data file with text strings. This is then read, and each string is headed with P1;1|, signifying load a string into a SHIFT-FUNCTION key. The string elements must be converted from ASCII to the hex representation of the character, in ASCII, so that the string "A" is the string "65". Terminate the string with S. .SKIP 1 The command file LOADTXT.COM reads the file at logical SHIFT_KEY_DEF and then pushes the specified text into the key. The data file at SHIFT_KEY_DEF is ASCII, with comments beginning with !. Each data line is as follows: .SKIP 1 .LIT nn/tttttttttttt...ttt .END LIT .SKIP 1 where nn is the key number, obtained from the VT2xx Programmer Pocket Guide, and ttttt...ttt is the text string. If the string ends in ~, a RETURN is inserted at the end of the line. .SKIP 1 Bon appetit! .CHAPTER PROMPTS .LM 5 .RM 80 The command file PROMPT.COM parses the node name and then sets it bold for a nice prompt, especially if you have many similar systems. Just execute it in the LOGIN.COM file for each system. .CHAPTER HELP FILEs .LM 5 .RM 80 CREATE_HELP_FILE.COM will set up a help file, with the various levels, and then put you into the EDITor to work up the file. It then invokes CHANGE_HELP.COM to put the help file into your own help library. This way, you can have help for all your one-off programs. I have included the help files that document my shift key definitions and my keypad definitions.