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