xref: /freebsd/usr.sbin/kbdcontrol/kbdmap.5 (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
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.
233The
234.Xr sysctl 8
235variable
236.Va machdep.enable_panic_key
237must be set to 1 to enable this feature.
238.It paste
239Act as mouse buffer paste.
240.El
241.Pp
242Finally,
243to complete the description of a key,
244a flag which describes
245the effect of caps lock and num lock
246on that key is given.
247The flag can be
248.Ql C
249to indicate that caps lock affects the key,
250.Ql N
251to indicate that num lock affects the key,
252.Ql B
253to indicate that both
254caps lock and num lock affects the key,
255or
256.Ql O
257to indicate that neither affects the key.
258.Pp
259An accent key works
260by modifying the behavior
261of the next key pressed.
262The description of an accent begins
263with one of the accent names
264given above.
265This is followed
266by the symbol for the accent,
267given in single quotes or
268as a decimal or hexadecimal
269.Tn ASCII
270value.
271This symbol will be produced
272if the accent key is pressed and
273then the space key is pressed.
274.Pp
275The description of the accent key
276continues with a list showing
277how it modifies various symbols,
278by giving pairs made up of the normal symbol and
279the modified symbol
280enclosed in parentheses.
281Both symbols in a pair can be given
282in either single quotes or
283as decimal or
284hexadecimal
285.Tn ASCII
286values.
287.Pp
288For example,
289consider the following extract from a
290.Nm :
291.Bd -literal -offset indent
292  041   dgra   172    nop    nop    '|'    '|'    nop    nop     O
293  dgra  '`'  ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 )
294             ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 )
295             ( 'u' 249 ) ( 'U' 217 )
296.Ed
297This extract
298configures the backtick key on a UK keyboard
299to act as a grave accent key.
300Pressing backtick followed by space
301produces a backtick, and
302pressing a backtick followed by a vowel
303produces the ISO-8859-1 symbol
304for that vowel with a grave accent.
305.Sh FILES
306.Bl -tag -width /usr/share/syscons/keymaps/* -compact
307.It Pa /usr/share/syscons/keymaps/*
308standard keyboard map files
309.El
310.Sh SEE ALSO
311.Xr kbdcontrol 1 ,
312.Xr kbdmap 1 ,
313.Xr keyboard 4 ,
314.Xr syscons 4 ,
315.Xr ascii 7
316.Sh HISTORY
317This manual page first appeared in
318.Fx 4.2 .
319