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