KB(4S) — SPECIAL FILES
NAME
kb − Sun keyboard
SYNOPSIS
pseudo-device kb3
DESCRIPTION
Kb provides access to the Sun workstation keyboard translation. Definitions for alterring keyboard translation are in <sundev/kbio.h> and <sundev/kbd.h>.
The call KIOCTRANS controls the presence of keyboard translation:
int x;
err = ioctl(fd, KIOCTRANS, &x);
where if x is 0 the keyboard tranlation 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 1.1 — Last change: 21 March 1984