VT220 keypad on OpenVMS: PF1 (GOLD) to PF4 and application keypad from a PC or tablet
Where PF1 to PF4 and the VT keypad keys are on a PC or tablet keyboard, what GOLD means in EDT, and why keypad keys type digits instead of commands.
OpenVMS editors and many VMS applications are driven from the auxiliary keypad of a DEC terminal: the block on the right with PF1 to PF4 along the top, digits 0 to 9, minus, comma, period and Enter. A PC keyboard has a different keypad, and most laptop and tablet keyboards have none, so the keys you need are somewhere else.
GOLD is PF1
In EDT, most keypad keys have two functions. Press the key for the first one. For the second, press GOLD first and then the key. GOLD is the top-left keypad key, labelled PF1 on VT100, VT200 and VT300 terminals. Like Shift, it does nothing on its own. EDT's own keypad help is on PF2.
What the keypad sends
The keypad has two modes, and the host picks one:
- Numeric mode: the digit keys, minus, comma and period send their characters, and Enter sends the same as Return: a carriage return, or CR LF when the host has set new-line mode. The keypad types like a normal keypad.
- Application mode (DECKPAM): every keypad key sends its own escape sequence, for example
ESC O pfor 0 andESC O Mfor Enter. This is what keypad editors need.
PF1 to PF4 send ESC O P, ESC O Q, ESC O R and ESC O S in both modes. In VT52 mode the codes are ESC P to ESC S.
If a keypad key types a digit in the editor instead of running a command, the terminal is sending numeric-mode codes. Either the application did not switch the keypad to application mode, or the terminal is set to ignore it.
Finding the keys on a PC keyboard
A PC keypad has Num Lock, /, * and - along its top, where a DEC keypad has PF1 to PF4. Many emulators can map PF1 to PF4 onto these four keys, in that order. PuTTY, for example, has a VT400 setting in which the top row of the numeric keypad sends ESC O P to ESC O S, and in application mode Num Lock stops acting as Num Lock and becomes another function key.
A PC keypad has no comma key, and its + key is in a different place, so check your emulator's keypad map for those two.
No keypad at all
On a laptop or tablet, many terminals send the same ESC O P to ESC O S codes from F1 to F4, so F1 works as PF1 (GOLD). The application-mode digits, comma and Enter need keys the terminal can map, or an on-screen keypad. The codes each key sends are listed in Keys and key codes.
Related
- Keys and key codes
- Telnet basics
- Standards and manuals: Telnet, VT and xterm
- App guide: VT220 and VT (Unix, Linux, VMS)