Keyboard/Console [include/linux/kd.h]

GIO_FONT *to be documented*
PIO_FONT *to be documented*
GIO_FONTX *to be documented*
PIO_FONTX *to be documented*
PIO_FONTRESET Reset font to the default font.
GIO_CMAP *to be documented*
PIO_CMAP *to be documented*
KIOCSOUND Generate a sound. edx should contain the frequency. 0 turns off the sound.
KDMKTONE Generate a fixed length tone. edx should contain desired frequency in the lower 16 bits and desired duration (in milliseconds) in the upper 16 bits. See samples/ioctl/leds.asm for an example.
KDGETLED Retrieve current state of the keyboard LED lights. edx should point to a 4 bytes long buffer which will receive the current state as a combination of the following flags:

LED_SCR - Scroll Lock
LED_NUM - Num Lock
LED_CAP - Caps Lock
KDSETLED

Set keyboard LED lights. edx should contain combination of the available flags (see above) or 0 (turn off all LEDs).

Note that this command only sets LEDs lights and doesn't actually turn on/off the caps, num, or scroll lock flags. See samples/ioctl/leds.asm for an example.

KDGKBTYPE Retrieve keyboard type. This operation will always return KB_101. There are other values defined in the kernel but not used: KB_84, KB_OTHER.
KDADDIO Add I/O port address to list of valid video adapter addresses. edx should contain 16bit address.
KDDELIO Remove I/O port address from list of valid video adapter addresses. edx should contain 16bit address to remove.
KDENABIO Enable IN and OUT calls to video adapter ports.
KDDISABIO Disable IN and OUT calls to video adapter ports.
KDSETMODE Set console mode. edx should contain the new mode (see below).
KDGETMODE Retrieves current console mode. edx should point to a 4 bytes long buffer which will receive the mode:

KD_TEXT     - Text mode.
KD_GRAPHICS - Graphics mode.
KDMAPDISP Not implemented.
KDUNMAPDISP Not implemented.
GIO_SCRNMAP *to be documented*
PIO_SCRNMAP *to be documented*
GIO_UNISCRNMAP *to be documented*
PIO_UNISCRNMAP *to be documented*
GIO_UNIMAP *to be documented*
PIO_UNIMAP *to be documented*
PIO_UNIMAPCLR *to be documented*
KDGKBMODE

Retrieve current keyboard mode. edx should point to a 4 bytes long buffer which will receive the mode:

K_RAW
K_XLATE
K_MEDIUMRAW
K_UNICODE

KDSKBMODE Set keyboard mode. edx should contain the new mode (see above).
KDSKBLED Set keyboard LED flags. edx should contain combination of the available flags (see below) or 0 (turn off all LED flags).

Note that this command only sets LED flags and doesn't actually turn on/off the caps, num, or scroll lock lights.
KDGKBLED Retrieve current state of the keyboard LEDs flags. edx should point to a 4 bytes long buffer which will receive the current state as a combination of the following flags:

LED_SCR - Scroll Lock
LED_NUM - Num Lock
LED_CAP - Caps Lock
KDGKBMETA Retrive current meta key handling mode. edx should point to a 4 bytes long buffer which will receive the mode:

K_METABIT
K_ESCPREFIX
KDSKBMETA Set meta key handling mode. edx should contain the new mode (see above).
KDGKBENT *to be documented*
KDSKBENT *to be documented*
KDGKBSENT *to be documented*
KDSKBSENT *to be documented*
KDGKBDIACR Retrieve kernel accent characters table. edx should point to a kbdiacrs structure which will receive the information:

struc kbdiacrs
{
.kb_cnt  rd 1
.kbdiacr rb 256*3
}

kbdiacrs members:

kb_cnt
Number of entries in the kbdiacr array.
kbdiacr
Array of kbdiacr structures:

struc kbdiacr
{
.diacr  rb 1
.base   rb 1
.result rb 1
}

KDSKBDIACR Set kernel accent characters table. edx should point to a propely initialized kbdiacrs structure (see above).
KDGETKEYCODE Retrieve kernel keycode table entry (convert scancode to keycode). edx should point to a kbkeycode structure which will receive the information:

struc kbkeycode
{
.scancode rd 1
.keycode  rd 1
}

kbkeycode members:

scancode
Scancode to convert.
keycode
Keycode.
KDSETKEYCODE Set kernel keycode table entry. edx should point to a properly initialized kbkeycode structure (see above).
KDSIGACCEPT *to be documented*
KDKBDREP Set keyboard repeat rate. edx should point to a properly initialized kbd_repeat structure:

struc kbd_repeat
{
.delay  rd 1
.period rd 1
}

kbd_repeat members:

delay
Delay in milliseconds.
period
Period in milliseconds.
KDFONTOP *to be documented*