Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH KBMAP 3 
2
.SH NAME
3
kbmap \- keyboard map
4
.SH SYNOPSIS
5
.nf
6
.B bind -a #κ /dev
7
 
8
.B /dev/kbmap
9
.fi
10
.SH DESCRIPTION
11
.PP
12
The
13
.I kbmap
14
device serves a one-level directory containing a single file,
15
.BR kbmap ,
16
representing the kernel's mapping of
17
keyboard scan codes to Unicode characters
18
(see
19
.IR cons (3)
20
and
21
.IR keyboard (6)).
22
.PP
23
Reads return the current contents of the map.
24
Each entry is one line containing three 11 character numeric fields, each followed by a space:
25
a table number, an index into the table (scan code), and the decimal value
26
of the corresponding Unicode character (0 if none).
27
The table numbers are platform dependent; they typically distinguish
28
between unshifted and shifted keys.
29
The scan code values are hardware dependent and can vary
30
from keyboard to keyboard.
31
.PP
32
Writes to the file change the map.
33
Lines written to the file must contain three space-separated fields,
34
representing the table number, scan code index, and Unicode character.
35
Values are taken to be decimal unless they start with
36
.B 0x
37
(hexadecimal) or
38
.B 0
39
(octal).
40
The Unicode character can also be represented as
41
.BI ' x
42
where
43
.I x
44
gives the UTF-8 representation of the character
45
(see
46
.IR utf (6)),
47
or as 
48
.BI ^ X
49
to represent a control character.
50
.PP
51
The Unicode character can also be
52
.BI M n
53
to represent mouse button
54
.IR n .
55
The map
56
.B /sys/lib/kbmap/mouse-fn
57
maps the F1 through F5 keys to the three mouse buttons and the two
58
scroll wheel buttons.
59
Similarly, 
60
.B mouse-csa
61
maps the left Control, Start, and Alt keys to the three mouse buttons.
62
These maps are useful on laptops without three-button mice.
63
.SH "SEE ALSO"
64
.IR cons (3),
65
.IR keyboard (6),
66
.IR utf (6)
67
.SH FILES
68
.B /sys/lib/kbmap/*
69
.SH SOURCE
70
.B /sys/src/9/port/devkbmap.c