2 .\" kbdcontrol - a utility for manipulating the syscons or vt keyboard driver section
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
21 .Nd keyboard control and configuration utility
29 .Ar duration . Ns Ar pitch | Ar belltype
33 .Ar delay . Ns Ar repeat | Ar speed
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
43 command is used to set various keyboard related options for the
47 console driver and the keyboard drivers,
48 such as key map, keyboard repeat and delay rates, bell
51 Keyboard options may be automatically configured at system boot time by
55 .Sx Boot Time Configuration
58 The following command line options are supported:
59 .Bl -tag -width indent
61 Detach the keyboard, specified by the keyboard device name, from the keyboard
63 When using this option, the standard input of the
65 process should be redirected from the keyboard multiplexer keyboard device
66 (if the keyboard multiplexer is not the active keyboard) or
68 (if the keyboard multiplexer is the active keyboard and
69 you are not working on the system console).
71 Attach the keyboard, specified by the keyboard device name, to the keyboard
73 When using this option, the standard input of the
75 process should be redirected from the keyboard multiplexer keyboard device
76 (if the keyboard multiplexer is not the active keyboard) or
78 (if the keyboard multiplexer is the active keyboard and
79 you are not working on the system console).
81 .Ar duration . Ns Ar pitch | Ar belltype
83 Set the bell duration in milliseconds and pitch in hertz.
86 argument is specified, it may be one of
88 which sets sound parameters back to normal values,
90 which disables the bell entirely, or
92 which sets the bell to visual mode, i.e., flashes the screen instead.
95 is preceded by the word
97 the bell will not be rung when the ringing process is in the background vty.
100 bell, when chosen, applies to all vtys; other bell types
101 can be set individually for each vty.
103 .Ar delay . Ns Ar repeat | Ar speed
107 (250, 500, 750, 1000)
110 (34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126,
111 136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440,
115 argument is specified, it may be one of
123 .It Fl l Ar keymap_file
124 Install keyboard map file from
126 You may load the keyboard map file from a menu-driven command,
128 The format of keyboard map files is documented in the
132 Dump the current keyboard map onto stdout.
133 The output may be redirected to a file and can be loaded
134 back to the kernel later by the
137 .It Fl f Ar # Ar string
138 Set function key number
142 Refer to the man page for the keyboard driver
145 for available function keys and their numbers.
147 Set function keys back to the standard definitions.
149 Use hexadecimal numbers in keyboard map dump.
151 Print brief information about the keyboard.
153 Disconnect the keyboard from the console.
156 option below to associate a keyboard with the console again.
157 .It Fl k Ar keyboard_device
158 Use the specified device as the console keyboard.
159 When using this option, the standard input of the
161 process should be redirected from
163 if you are not working on the system console
167 .It Fl L Ar keymap_file
168 Load keyboard map file from
172 compiled from it to stdout.
173 This option is primarily intended for programmers and is probably
174 of little use under normal circumstances.
176 Search for the keymap file in
180 option may be specified multiple times.
183 The environment variable
185 can hold an alternative path to the keyboard map files.
186 .Sh KEYBOARD CONFIGURATION
187 .Ss Boot Time Configuration
188 You may set variables in
191 .Pa /etc/rc.conf.local
192 in order to configure the keyboard at boot time.
193 The following is the list of relevant variables.
195 .Bl -tag -width foo_bar_var -compact
197 Specifies a keyboard map file for the
201 Sets the keyboard repeat rate for the
205 Lists function key strings for the
213 .Ss Driver Configuration
214 The keyboard device driver may let you change default configuration
215 options, such as the default keyboard map, so that you do not need to set up
216 the options at boot time.
217 See keyboard driver manuals
223 .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
224 .It Pa /usr/share/syscons/keymaps/*
225 keyboard map files for syscons
226 .It Pa /usr/share/vt/keymaps/*
227 keyboard map files for vt
230 The following command will load the keyboard map file
231 .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
233 .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
235 So long as the keyboard map file resides in
236 .Pa /usr/share/syscons/keymaps
239 .Pa /usr/share/vt/keymaps
242 you may abbreviate the file name as
246 uses Unicode, the corresponding keyboard file names omit the encoding
247 and typically are just a country code, e.g.\&
250 .Dl kbdcontrol -l ru.koi8-r
252 The following command will make the function key 10 emit "telnet myhost".
254 .Dl kbdcontrol -f 10 \&"telnet myhost\&"
256 In order to get the visual effect for bell, but prevent the screen
257 from flashing if the bell is to ring in the background screen,
258 run the following command.
260 .Dl kbdcontrol -b quiet.visual
262 To change the default console keyboard to another keyboard,
263 for example the first USB keyboard (see
265 use the following command.
267 .Dl kbdcontrol -k /dev/ukbd0 < /dev/console
269 To switch back to the default keyboard, use this command.
271 .Dl kbdcontrol -k /dev/kbd0
273 To allow using both the second USB keyboard and the first AT keyboard
274 at the same time on console via the
276 driver, use the following sequence of commands.
277 .Bd -literal -offset indent
278 kbdcontrol -K < /dev/console
279 kbdcontrol -a atkbd0 < /dev/kbdmux0
280 kbdcontrol -a ukbd1 < /dev/kbdmux0
281 kbdcontrol -k /dev/kbdmux0 < /dev/console
296 .An S\(/oren Schmidt Aq sos@FreeBSD.org