add .Mt to man pages in usr.sbin/
[dragonfly.git] / usr.sbin / kbdcontrol / kbdcontrol.1
1 .\"
2 .\" kbdcontrol - a utility for manipulating the syscons keyboard driver section
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 .\"     @(#)kbdcontrol.1
14 .\" $FreeBSD: src/usr.sbin/kbdcontrol/kbdcontrol.1,v 1.18.2.9 2001/08/16 15:56:00 ru Exp $
15 .\"
16 .Dd September 12, 2009
17 .Dt KBDCONTROL 1
18 .Os
19 .Sh NAME
20 .Nm kbdcontrol
21 .Nd keyboard control and configuration utility
22 .Sh SYNOPSIS
23 .Nm
24 .Op Fl dFKix
25 .Op Fl A Ar name
26 .Op Fl a Ar name
27 .Oo
28 .Fl b
29 .Ar duration . Ns Ar pitch | Ar belltype
30 .Oc
31 .Oo
32 .Fl r
33 .Ar delay . Ns Ar repeat | Ar speed
34 .Oc
35 .Op Fl l Ar keymap_file
36 .Op Fl f Ar # Ar string
37 .Op Fl h Ar size
38 .Op Fl k Ar keyboard_device
39 .Op Fl L Ar keymap_file
40 .Sh DESCRIPTION
41 The
42 .Nm
43 command is used to set various keyboard related options for the
44 .Xr syscons 4
45 console driver and the keyboard drivers,
46 such as key map, keyboard repeat and delay rates, bell
47 characteristics etc.
48 .Pp
49 Keyboard options may be automatically configured at system boot time by
50 setting variables in
51 .Pa /etc/rc.conf .
52 See
53 .Sx Boot Time Configuration
54 below.
55 .Pp
56 The following command line options are supported:
57 .Bl -tag -width indent
58 .It Fl A Ar name
59 Detach the keyboard, specified by the keyboard device name, from the keyboard
60 multiplexer.
61 When using this option, the standard input of the
62 .Nm
63 process should be redirected from the keyboard multiplexer keyboard device
64 (if the keyboard multiplexer is not the active keyboard) or
65 .Pa /dev/console
66 (if the keyboard multiplexer is the active keyboard and
67 you are not working on the system console).
68 .It Fl a Ar name
69 Attach the keyboard, specified by the keyboard device name, to the keyboard
70 multiplexer.
71 When using this option, the standard input of the
72 .Nm
73 process should be redirected from the keyboard multiplexer keyboard device
74 (if the keyboard multiplexer is not the active keyboard) or
75 .Pa /dev/console
76 (if the keyboard multiplexer is the active keyboard and
77 you are not working on the system console).
78 .It Fl b Xo
79 .Ar duration . Ns Ar pitch | Ar belltype
80 .Xc
81 Set the bell duration in milliseconds and pitch in hertz.
82 If a
83 .Ar belltype
84 argument is specified, it may be one of
85 .Cm normal
86 which sets sound parameters back to normal values,
87 .Cm off
88 which disables the bell entirely, or
89 .Cm visual
90 which sets the bell to visual mode, i.e., flashes the screen instead.
91 If
92 .Ar belltype
93 is preceded by the word
94 .Cm quiet. ,
95 the bell will not be rung when the ringing process is in the background vty.
96 The
97 .Cm visual
98 bell, when chosen, applies to all vtys; other bell types
99 can be set individually for each vty.
100 .It Fl r Xo
101 .Ar delay . Ns Ar repeat | Ar speed
102 .Xc
103 Set keyboard
104 .Ar delay
105 (250, 500, 750, 1000)
106 and
107 .Ar repeat
108 (34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126,
109 136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440,
110 472, 504)
111 rates, or if a
112 .Ar speed
113 argument is specified, it may be one of
114 .Cm slow
115 (1000.504),
116 .Cm fast
117 (250.34)
118 or
119 .Cm normal
120 (500.126).
121 .It Fl l Ar keymap_file
122 Install keyboard map file from
123 .Ar keymap_file .
124 You may load the keyboard map file from a menu-driven command,
125 .Xr kbdmap 1 .
126 The format of keyboard map files is documented in the
127 .Xr kbdmap 5
128 manual page.
129 .It Fl d
130 Dump the current keyboard map onto stdout.
131 The output may be redirected to a file and can be loaded
132 back to the kernel later by the
133 .Fl l
134 option above.
135 .It Fl f Ar # Ar string
136 Set function key number
137 .Ar #
138 to send
139 .Ar string .
140 Refer to the man page for the keyboard driver
141 (e.g.\&
142 .Xr atkbd 4 )
143 for available function keys and their numbers.
144 .It Fl F
145 Set function keys back to the standard definitions.
146 .It Fl x
147 Use hexadecimal numbers in keyboard map dump.
148 .It Fl h Ar size
149 Set history buffer size to
150 .Ar size
151 lines.
152 .It Fl i
153 Print brief information about the keyboard.
154 .It Fl K
155 Disconnect the keyboard from the console.
156 You need to use the
157 .Fl k
158 option below to associate a keyboard with the console again.
159 .It Fl k Ar keyboard_device
160 Use the specified device as the console keyboard.
161 When using this option, the standard input of the
162 .Nm
163 process should be redirected from
164 .Pa /dev/console
165 if you are not working on the system console
166 (see the
167 .Sx EXAMPLES
168 section).
169 .It Fl L Ar keymap_file
170 Load keyboard map file from
171 .Ar keymap_file
172 and write the
173 .Ft "struct keymap"
174 compiled from it to stdout.
175 This option is primarily intended for programmers and is probably
176 of little use under normal circumstances.
177 .El
178 .Sh ENVIRONMENT
179 The environment variable
180 .Ev KEYMAP_PATH
181 can hold an alternative path to the keyboard map files.
182 .Sh KEYBOARD CONFIGURATION
183 .Ss Boot Time Configuration
184 You may set variables in
185 .Pa /etc/rc.conf
186 or
187 .Pa /etc/rc.conf.local
188 in order to configure the keyboard at boot time.
189 The following is the list of relevant variables.
190 .Pp
191 .Bl -tag -width foo_bar_var -compact
192 .It Ar keymap
193 Specifies a keyboard map file for the
194 .Fl l
195 option.
196 .It Ar keyrate
197 Sets the keyboard repeat rate for the
198 .Fl r
199 option.
200 .It Ar keychange
201 Lists function key strings for the
202 .Fl f
203 option.
204 .El
205 .Pp
206 See
207 .Xr rc.conf 5
208 for details.
209 .Ss Driver Configuration
210 The keyboard device driver may let you change default configuration
211 options, such as the default keyboard map, so that you do not need to set up
212 the options at boot time.
213 See keyboard driver manuals
214 (e.g.\&
215 .Xr atkbd 4 ,
216 .Xr ukbd 4 )
217 for details.
218 .Sh FILES
219 .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
220 .It Pa /usr/share/syscons/keymaps/*
221 keyboard map files
222 .El
223 .Sh EXAMPLES
224 The following command will load the keyboard map file
225 .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
226 .Pp
227 .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
228 .Pp
229 So long as the keyboard map file resides in
230 .Pa /usr/share/syscons/keymaps ,
231 you may abbreviate the file name as
232 .Pa ru.koi8-r .
233 .Pp
234 .Dl kbdcontrol -l ru.koi8-r
235 .Pp
236 The following command will make the function key 10 emit "telnet myhost".
237 .Pp
238 .Dl kbdcontrol -f 10 \&"telnet myhost\&"
239 .Pp
240 In order to get the visual effect for bell, but prevent the screen
241 from flushing if the bell is to ring in the background screen,
242 run the following command.
243 .Pp
244 .Dl kbdcontrol -b quiet.visual
245 .Pp
246 To change the default console keyboard to another keyboard,
247 for example the first USB keyboard (see
248 .Xr ukbd 4 ) ,
249 use the following commands.
250 .Pp
251 .Dl kbdcontrol -k /dev/kbd1 < /dev/console
252 .Pp
253 To switch back to the default keyboard, use this command.
254 .Pp
255 .Dl kbdcontrol -k /dev/kbd0
256 .Sh SEE ALSO
257 .Xr kbdmap 1 ,
258 .Xr vidcontrol 1 ,
259 .Xr atkbd 4 ,
260 .Xr kbdmux 4 ,
261 .Xr keyboard 4 ,
262 .Xr screen 4 ,
263 .Xr syscons 4 ,
264 .Xr ukbd 4 ,
265 .Xr kbdmap 5 ,
266 .Xr rc.conf 5
267 .Sh AUTHORS
268 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org
269 .Sh BUGS
270 Report when found.