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