DECPFK—Program Function Key
Used to reprogram function keys.
Format
DCS 9/0 |
" 2/2 |
x 7/8 |
D . . . D ... |
ST 9/12 |
Description
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:
- a local terminal function
- a user-defined sequence (same as UDK)
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:
- Program keys through DECPFK or through Set-Up
- Program keys through DECPAK or through Set-Up
- Copy other key default through DECCKD or Set-Up
- Program user-defined keys through DECUDK
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:
- Execute a Restore factory defaults from the Set-Up main menu. All the terminal parameters, including the keys, return to their default states.
- Execute a "Restore factory defaults of all keys and key definitions" either through DECPKA (Program Key Action) or Recall key definitions in Set-Up. This action also releases the 804 bytes.
- Execute a Copy key default to copy a key's own default either through DECCKD or in Set-Up to free the space occupied by the destination key.
- Clear UDKs by issuing a clear function in DECUDK.
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;........;
Parameters
Keyn
is the key station number and a slash "/" is a delimiter. Refer to Chapter 8 for
the key station number map.
Modn
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.
UDS
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.
- UDS in DECPFK is functionally equivalent to the string Stn in the DECUDK control function.
- See DECUDK—User Defined Keys.
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:
|
1 | Local | Terminal screen only. |
2 | Remote | Host only. |
Default: None (Normal)
Description
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):
- Control function DECPFK
- Control function DECPAK
- Control function DECUDK
- In Set-Up, Define key ...
Once programmed, the key state is not effected by the terminal mode changes listed below:
- Keyboard mode change, such as switching between Data Processing mode and Typewriter mode
- Character Mode change, such as switching between 7-bit character and 8-bit character
- Keyboard Layout change, such as switching between PC layout and VT layout
- Keyboard Style change, such as switching between PC-style and VT-style
- Terminal Mode change, such as switching between VT modes
This function works in all the ANSI VT modes except VT52 mode.