How to define your own terminal setup Check section 5.3 of the SMG$ manual for more info. If you have a terminal, or terminal program, that doesn't behave like a standard terminal known to VMS, or it doesn't have all the keys defined, you can use this to create your own definition. This tells the system what control sequences to map to which functions. It is also used to define what sequences to send to the terminal for cursor control, highlighting, etc. 1. Build a file called TERMTABLE.TXT. To start, extract out the existing section from SYS$SYSTEM:SMGTERMS.TXT, the one that best matches the terminal in question. Change the NAME to a unique string, one not already used as a terminal name, like MY100. Then make any necessary changes, for the particular keycodes and sequences for your terminal. See details below. 2. Compile with MCR SMGBLDTRM. This produces a file called TERMTABLE.EXE 3. Define TERM$TABLOC to point to your TERMTABLE.EXE. $define term$tabloc disk:[dir.subdir]termtable.exe 4. Now you can do a SET TERMINAL/DEVICE=MY100, and it now use the definitions you put in the TERMTABLE.TXT file. Notes * Do not use a NAME already used by the system file. Otherwise that definition will be used, instead of using your definition. * You can put more than one terminal definition in this file. Just give it a different NAME, and use the SET TERMINAL/DEVICE= command with that NAME. * If you want to have this done automatically when you log in, make sure you first check that you're at a session (and not a batch job for example). This command all goes on the same line. Note that you will need to include the define command above also, so it can find your definition. $if f$mode().eqs."INTERACTIVE" then set terminal/device=my100 * If you want to do this system wide, you can add your terminal definition to the system file (sys$system:termtable.txt) and then compile it, and replace sys$system:termtable.exe with this new file. Note that there are typically more than one directory under sys$system, so you need to ensure any changes you make are in the directory currently holding the above files. Example of modifying your TERMTABLE.TXT In the file will be lines like the one below. This defines the keycode sequence for F5. So, when the system sees an [15~ come in, it says "OK, that means you pushed F5" and then it does whatever F5 is supposed to do. Note that the "$" character is used to indicate an escape code in the TERMTABLE.TXT file. key_f5 = "$[15~" For example, say your keyboard/emulator is missing the GOLD key (bad example, it's really called PF1). Then say you want to use the F5 key on your keyboard to act as the PF1 key. You find out what control code the F5 key sends, go into the TERMTABLE.TXT file, find the entry for key_pf1, and change the string to what the F5 key sends out (use $ to indicate the escape character). One way to find out what it sends, if it starts with , and most do, is to go into the EDT editor (edit/edt anything.txt). You need to be in the full-screen mode, not line mode. Then push the escape key once, then push the F5 key. This will then show you the escape sequence. This is what you use in the string for that key. And, or course, use $ to indicate the escape character. Any "function" key should do, whatever makes the most sense, and/or is easiest to use. Just remember you can't use that key on your keyboard for it's original purpose (unless you do a different SET TERMINAL command) and don't pick something that will conflict with a sequence already in use (usually not a problem). If you don't have extra keys to use, you can use a modified key sequence (SHIFT, CONTROL). Then you press "SHIFT key" when you want to indicate the F5 was pressed. This method means you will always have to press SHIFT with the key, but if you don't have extra keys, and/or don't use that key very often, this is a solution. This just changed re-defining a key. The file also has codes to control things like highlighting, underlining, etc. So if your terminal/program needs a special sequence to go into highlight mode, for example, this is where you change them.