VT510 Video Terminal Programmer Information

SCODFK—Define Function Key

Programs function key to send a defined string in SCO Console mode.

Format

ESC
1/11
Q
5/1
Fn
...
string
...

Parameters

Fn
is an ASCII code representing the function key being defined. F1, the first key, is represented by "0"; each following key has an ASCII value that increments 1 from the previous key's ASCII value as follows:

Key Function Key Fn ASCII Character
1 - 12 F1 through F12 0 - ;
13 - 24 Shift/F1 through Shift/F12 < - G
25 - 36 Ctrl/F1 through Ctrl/F12 H - S
37 - 48 Ctrl/Shift/F1 through Ctrl/Shift/F12 T - _
49 Kpd 7 `
50 Kpd 8 a
51 Kpd 9 b
52 Kpd - c
53 Kpd 4 d
54 Kpd 5 e
55 Kpd 6 f
56 Kpd + g
57 Kpd 1 h
58 Kpd 2 i
59 Kpd 3 j
60 Kpd 0 k

String
is the programmed key definition which is enveloped by two characters as the delimiters.

Description

The first character after the ASCII character representing a function key becomes the delimiter. It looks for an identical character as the second and final delimiter. If string is too long and no memory is available, then the command string is aborted and remaining characters are displayed on screen. The character becomes the final character. All the following characters are displayed on the screen.

Example:

Executing "ESC Q 0 'abcdefghij'klmnopq" when 100 bytes of memory is available defines the string "abcdefghij" into F1 function key and displays "klmnopq" on the screen.

If you execute the same sequence when only a 4 byte string is allowed, then the whole sequence is aborted.

A "^" character causes any following character to subtract 32 from its ASCII value. For example, "^e" in the string sends "E" when the key is pressed.

Any code in the 00-7F region can be defined. An 8-bit code entered is stripped of its eighth bit and defined as a corresponding 7-bit code.

For example, executing ESCQ0'F1KEY' defines string F1KEY for function key F1; ESC1aF2KEYa defines string F2key for F2.

The maximum string length for a defined key is 255 characters.