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