Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cons(3)

keyboard(6)

utf(6)

KBMAP(3)

NAME

kbmap − keyboard map

SYNOPSIS

­bind -a #κ /dev
 ­/dev/kbmap

DESCRIPTION

The ­kbmap device serves a one-level directory containing a single file, kbmap, representing the kernel’s mapping of keyboard scan codes to Unicode characters (see cons(3) and keyboard(6)).

Reads return the current contents of the map.  Each entry is one line containing three 11 character numeric fields, each followed by a space: a table number, an index into the table (scan code), and the decimal value of the corresponding Unicode character (0 if none).  The table numbers are platform dependent; they typically distinguish between unshifted and shifted keys.  The scan code values are hardware dependent and can vary from keyboard to keyboard. 

Writes to the file change the map.  Lines written to the file must contain three space-separated numeric fields, representing the table number, scan code index, and Unicode character.  Values are taken to be decimal unless they start with ­0x (hexadecimal) or ­0 (octal).  The Unicode character can also be represented as ’x where ­x gives the UTF-8 representation of the character (see utf(6)).

SEE ALSO

cons(3), keyboard(6), utf(6)

FILES

­/sys/lib/kbmap/∗

SOURCE

­/sys/src/9/port/devkbmap.c

Plan 9  —  March 16, 2004

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026