|
|
assigns the string date as the output of function
key 1. The string can contain control characters,
such as a newline character, and should be quoted to protect
it from processing by the shell. For example, the command:
setkey 2 "pwd; lc\n"
assigns the command sequence pwd; lc to function key 2. The newline character is embedded in the quoted string, so that the commands are executed when you press function key 2. If the newline character is not included in the quoted string, you must press the Enter key after pressing the function key.
setkey translates ``^'' into ``^^'', which, when passed to the screen driver, is interpreted as a right angle bracket ``>'', or greater than key.
The following option is recognized:
Function keys are defined in the string mapping table. This table is an array of 512 bytes (typedef strmap_t) where null terminated strings redefine function keys. The first null terminated string is assigned to the first string key, the second to the second string key, and so on. There is one string mapping table per multiscreen.
Although the size of the setkey string mapping table is 512 bytes, 30 characters is the maximum size for any individual function key assignment.
Assigning more than 512 characters to the string mapping table causes the function key buffer to overflow. When this happens, the sequences sent by the arrow keys are overwritten, effectively disabling them. Once the function key buffer overflows, the only way to enable the arrow keys is to reboot the system.
The table below lists the keynum values for the function keys:
Function key | keynum | Function key | keynum | |
---|---|---|---|---|
F1 | 1 | CTRL-F10 | 34 | |
F2 | 2 | CTRL-F11 | 35 | |
F3 | 3 | CTRL-F12 | 36 | |
F4 | 4 | CTRL-Shift-F1 | 37 | |
F5 | 5 | CTRL-Shift-F2 | 38 | |
F6 | 6 | CTRL-Shift-F3 | 39 | |
F7 | 7 | CTRL-Shift-F4 | 40 | |
F8 | 8 | CTRL-Shift-F5 | 41 | |
F9 | 9 | CTRL-Shift-F6 | 42 | |
F10 | 10 | CTRL-Shift-F7 | 43 | |
F11 | 11 | CTRL-Shift-F8 | 44 | |
F12 | 12 | CTRL-Shift-F9 | 45 | |
Shift-F1 | 13 | CTRL-Shift-F10 | 46 | |
Shift-F2 | 14 | CTRL-Shift-F11 | 47 | |
Shift-F3 | 15 | CTRL-Shift-F12 | 48 | |
Shift-F4 | 16 | _ | _ | |
Shift-F5 | 17 | Numeric Key-Pad | keynum | |
Shift-F6 | 18 | _ | _ | |
Shift-F7 | 19 | 7 | 49 | |
Shift-F8 | 20 | 8 | 50 | |
Shift-F9 | 21 | 9 | 51 | |
Shift-F10 | 22 | - | 52 | |
Shift-F11 | 23 | 4 | 53 | |
Shift-F12 | 24 | 5 | 54 | |
CTRL-F1 | 25 | 6 | 55 | |
CTRL-F2 | 26 | + | 56 | |
CTRL-F3 | 27 | 1 | 57 | |
CTRL-F4 | 28 | 2 | 58 | |
CTRL-F5 | 29 | 3 | 59 | |
CTRL-F6 | 30 | 0 | 60 | |
CTRL-F7 | 31 | |||
CTRL-F8 | 32 | |||
CTRL-F9 | 33 |