DECPFK—Program Function Key

Used to reprogram function keys.


D . . . D


This sequence programs one or more keys (and their modifier combinations) from the current state to perform user-desired functions. The type of the function programmed must be either:

This sequence is ignored when the program key function is locked through DECPKA, DECUDK, or Set-Up.

There are 804 bytes reserved for programmable key operations. This memory is shared by the following four functions:

Space is supplied on a first-come, first-serve basis. Once the 804 bytes are used, no more keys may be redefined unless space is made available. Space may be made available by restoring keys back to their default states. There are four ways to do this:

The free bytes left for key programming can be seen using the Define Key Editor in Set-Up. D ... D are the key definition strings such as:

Key1/Mod1/Function #/UDS/UDS Direction;
Key2/Mod2/Function #/UDS/UDS Direction;........;


is the key station number and a slash "/" is a delimiter. Refer to Chapter 8 for the key station number map.

denotes the modifier key that is to be pressed at the same time as the defined key.

Modn Modifier Key
0 or None Normal
1 Normal
2 Shift
3 Alt
4 Alt + Shift
5 Control
6 Shift + Control
7 Alt + Control
8 Alt + Control + Shift

Function #
represents a number associated with a local function. For example, function number "0" is used to make the key or key/modifier inoperative. Function number "100" indicates a user-defined sequence (UDS) and UDS direction is defined following the slash "/" delimiter. Refer to Chapter 8.

is a user-defined sequence with a maximum length of 255 bytes, which must be written in Hex format for DEC/ANSI terminals. Each hex code in this string represents a value transmitted by the defined key combined with the modifiers.

Dir (UDS Direction)
the user-defined sequence (UDS) direction of the transmission.

Dir Direction UDS is sent to . . .
0, none Normal Host and/or the terminal, depending on the setting of the COMM mode parameter. The UDS is directed to:
  • The host for full-duplex mode.
  • The screen for half-duplex mode.
1 Local Terminal screen only.
2 Remote Host only.

Default: None (Normal)


Any of the following four methods may be used to define a key to transmit a user-defined sequence (either single byte or multiple bytes):

Once programmed, the key state is not effected by the terminal mode changes listed below:

This function works in all the ANSI VT modes except VT52 mode.