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