INSTRUCTIONS TO INSTALL KEY DEFINITION UTILITIES by Robert L. Hays CHAPTER 1 UTILITIES USING THE "DEFINE/KEY" DCL COMMAND 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. 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 EDTSTART.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. 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. The logical symbol DEFINEKEYS 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, DEFINEKEYS.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. The command file CHANGEKEYDEF.COM is a simple interface to the DEFINE/KEY utility, allowing key definitions to be added to the DEFINEKEYS file and/or executing the DEFINE/KEY command. CHAPTER 2 STICKING TEXT INTO YOUR VT2XX KEYS 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. 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. The command file LOADTXT.COM reads the file at logical SHIFTKEYDEF and then pushes the specified text into the key. The data file at SHIFTKEYDEF is ASCII, with comments beginning with !. Each data line is as follows: nn/tttttttttttt...ttt 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. Bon appetit! CHAPTER 3 PROMPTS 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 4 HELP FILES CREATEHELPFILE.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 CHANGEHELP.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.