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