xref: /freebsd/usr.sbin/kbdcontrol/kbdmap.5 (revision c98323078dede7579020518ec84cdcb478e5c142)
1.\" Copyright (c) 2000
2.\"	David Malone
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd September 11, 2000
28.Dt KBDMAP 5
29.Os
30.Sh NAME
31.Nm kbdmap
32.Nd keyboard map file format for kbdcontrol
33.Sh SYNOPSIS
34.Nm
35.Sh DESCRIPTION
36A
37.Nm
38file describes how the keys on a keyboard should behave.
39These files can be loaded
40using
41.Xr kbdcontrol 1 ,
42or
43.Xr kbdmap 1
44can be used to select one of the default
45.Nm
46files interactively.
47A
48.Nm
49file can be specified in
50.Xr rc.conf 5 ,
51to be loaded
52at boot time.
53The current keymap may also be printed using
54.Xr kbdcontrol 1 .
55.Pp
56Each line in the file
57can describe a key or an accent.
58A
59.Ql #
60character begins a comment,
61which extends to the end of the line.
62.Pp
63The description of a key
64begins with the scancode for that key.
65Then the effect of the key
66under combinations of
67shift,
68control
69and alt
70are listed in the following order:
71no modifier,
72shift,
73control,
74control and shift,
75alt,
76alt and shift,
77alt and control,
78alt and control and shift.
79The action of the key
80under each modifier can be:
81.Bl -tag -width Ar
82.It ' Ns Ar symbol Ns No '
83The symbol the key should produce,
84in single quotes.
85.It Ar decnum
86The
87.Tn ASCII
88value to produce
89as a decimal number
90(see
91.Xr ascii 7 ) .
92For example, 32 for space.
93.It 0x Ns Ar hexnum
94The
95.Tn ASCII
96value to produce
97as a hexadecimal number.
98For example, 0x20 for space.
99.It Ar ctrlname
100One of the standard names
101for the
102.Tn ASCII
103control characters:
104nul,
105soh,
106stx,
107etx,
108eot,
109enq,
110ack,
111bel,
112bs,
113ht,
114nl,
115vt,
116np,
117cr,
118so,
119si,
120dle,
121dc1,
122dc2,
123dc3,
124dc4,
125nak,
126syn,
127etb,
128can,
129em,
130sub,
131esc,
132fs,
133gs,
134rs,
135ns,
136us,
137sp,
138del.
139.It Ar accentname
140By giving one of the accent names,
141the next key pressed will produce
142an accented character
143in accordance with that accent.
144See the description of accents below.
145The accent names are:
146dgra,
147dacu,
148dcir,
149dtil,
150dmac,
151dbre,
152ddot,
153duml,
154ddia,
155dsla,
156drin,
157dced,
158dapo,
159ddac,
160dogo,
161dcar.
162.It fkey Ns Ar N
163Act as the
164.Ar N Ns No th
165function key,
166where
167.Ar N
168is a decimal number.
169.It lshift
170Act as left shift key.
171.It rshift
172Act as right shift key.
173.It clock
174Act as caps lock key.
175.It nlock
176Act as num lock key.
177.It slock
178Act as scroll lock key.
179.It lalt|alt
180Act as left alt key.
181.It btab
182Act as backwards tab.
183.It lctrl|ctrl
184Act as left control key.
185.It rctrl
186Act as right control key.
187.It ralt
188Act as right alt (altgr) key.
189.It alock
190Act as alt lock key.
191.It ashift
192Act as alt shift key.
193.It meta
194Act as meta key.
195.It lshifta|shifta
196Act as left shift key / alt lock.
197.It rshifta
198Act as right shift key / alt lock.
199.It lctrla|ctrla
200Act as left ctrl key / alt lock.
201.It rctrla
202Act as right ctrl key / alt lock.
203.It lalta|alta
204Act as left alt key / alt lock.
205.It ralta
206Act as right alt key / alt lock.
207.It nscr
208Act as switch to next screen.
209.It pscr
210Act as switch to previous screen.
211.It scr Ns Ar N
212Switch to screen
213.Ar N ,
214where
215.Ar N
216is a decimal number.
217.It boot
218Reboot the machine.
219.It halt
220Halt the machine.
221.It pdwn
222Halt the machine
223and attempt to power it down.
224.It debug
225Call the debugger.
226.It susp
227Use APM to suspend power.
228.It saver
229Activate screen saver
230by toggling between splash/text screen.
231.It panic
232Panic the system.
233.It paste
234Act as mouse buffer paste.
235.El
236.Pp
237Finally,
238to complete the description of a key,
239a flag which describes
240the effect of caps lock and num lock
241on that key is given.
242The flag can be
243.Ql C
244to indicate that caps lock affects the key,
245.Ql N
246to indicate that num lock affects the key,
247.Ql B
248to indicate that both
249caps lock and num lock affects the key,
250or
251.Ql O
252to indicate that neither affects the key.
253.Pp
254An accent key works
255by modifying the behavior
256of the next key pressed.
257The description of an accent begins
258with one of the accent names
259given above.
260This is followed
261by the symbol for the accent,
262given in single quotes or
263as a decimal or hexadecimal
264.Tn ASCII
265value.
266This symbol will be produced
267if the accent key is pressed and
268then the space key is pressed.
269.Pp
270The description of the accent key
271continues with a list showing
272how it modifies various symbols,
273by giving pairs made up of the normal symbol and
274the modified symbol
275enclosed in parentheses.
276Both symbols in a pair can be given
277in either single quotes or
278as decimal or
279hexadecimal
280.Tn ASCII
281values.
282.Pp
283For example,
284consider the following extract from a
285.Nm :
286.Bd -literal -offset indent
287  041   dgra   172    nop    nop    '|'    '|'    nop    nop     O
288  dgra  '`'  ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 )
289             ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 )
290             ( 'u' 249 ) ( 'U' 217 )
291.Ed
292This extract
293configures the backtick key on a UK keyboard
294to act as a grave accent key.
295Pressing backtick followed by space
296produces a backtick, and
297pressing a backtick followed by a vowel
298produces the ISO-8859-1 symbol
299for that vowel with a grave accent.
300.Sh FILES
301.Bl -tag -width /usr/share/syscons/keymaps/* -compact
302.It Pa /usr/share/syscons/keymaps/*
303standard keyboard map files
304.El
305.Sh SEE ALSO
306.Xr kbdcontrol 1 ,
307.Xr kbdmap 1 ,
308.Xr keyboard 4 ,
309.Xr syscons 4 ,
310.Xr ascii 7
311.Sh HISTORY
312This manual page first appeared in
313.Fx 4.2 .
314