KB(4S) — SPECIAL FILES
NAME
kb − Sun keyboard
SYNOPSIS
pseudo-device kbnumber
DESCRIPTION
Kb provides access to the Sun workstation keyboard translation. Definitions for altering keyboard translation are in <sundev/kbio.h> and <sundev/kbd.h>. The number argument specifies the maximum number of keyboards supported by the system.
The call KIOCTRANS controls the presence of keyboard translation:
int x;
err = ioctl(fd, KIOCTRANS, &x);
When x is 0, keyboard translation is turned off and up/down key codes are reported. Specifying x as 1 restores normal keyboard translations.
The call KIOCSETKEY changes a keyboard translation table entry:
structkiockey {
intkio_tablemask;/∗ Translation table (one of: 0, CAPSMASK,
SHIFTMASK, CTRLMASK, UPMASK) ∗/
u_charkio_station;/∗ Physical keyboard key station (0-127) ∗/
u_charkio_entry;/∗ Translation table station’s entry ∗/
charkio_string[10];/∗ Value for STRING entries (null terminated) ∗/
};
struct kiockey key;
err = ioctl(fd, KIOCSETKEY, &key);
Set kio_tablemask table’s kio_station to kio_entry. Copy kio_string to string table if kio_entry is between STRING and STRING+15. This call may return EINVAL if there are invalid arguments.
The call KIOCGETKEY determines the current value of a keyboard translation table entry:
struct kiockey key;
err = ioctl(fd, KIOCGETKEY, &key);
Get kio_tablemask table’s kio_station to kio_entry. Get kio_string from string table if kio_entry is between STRING and STRING+15. This call may return EINVAL if there are invalid arguments.
FILES
/dev/kbd
SEE ALSO
Sun Release 2.0 — Last change: 1 November 1984