SETKEY(C) XENIX System V SETKEY(C)
Name
setkey - Assigns the function keys.
Syntax
setkey keynum string
Description
The setkey command assigns the given ANSI string to be the
output of the computer function key given by keynum. For
example, the command:
setkey 1 date
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.
Notice how the newline character is embedded in the quoted
string. This causes the commands to be carried out when
function key 2 is pressed. Otherwise, the Enter key would
have to be pressed after pressing the function key, as in
the previous example.
Files
/bin/setkey
See Also
keyboard(HW)
Notes
setkey works only on the console keyboard.
The string mapping table is where the function keys are
defined. It is an array of 256 bytes (typedef strmap_t )
where null terminated strings can be put to redefine the
function keys. The first null terminated string is assigned
to the first string key and the second string key and so on.
There is no limit on the length of any particular string as
long as the whole table does not exceed 256 bytes, including
nulls. Strings can be made null by the introduction of
extra null characters.
Page 1 (printed 8/7/87)