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
42 command is used to set various keyboard related options for the
46 console driver and the keyboard drivers,
47 such as key map, keyboard repeat and delay rates, bell
50 Keyboard options may be automatically configured at system boot time by
54 .Sx Boot Time Configuration
57 The following command line options are supported:
58 .Bl -tag -width indent
60 Detach the keyboard, specified by the keyboard device name, from the keyboard
62 When using this option, the standard input of the
64 process should be redirected from the keyboard multiplexer keyboard device
65 (if the keyboard multiplexer is not the active keyboard) or
67 (if the keyboard multiplexer is the active keyboard and
68 you are not working on the system console).
70 Attach the keyboard, specified by the keyboard device name, to the keyboard
72 When using this option, the standard input of the
74 process should be redirected from the keyboard multiplexer keyboard device
75 (if the keyboard multiplexer is not the active keyboard) or
77 (if the keyboard multiplexer is the active keyboard and
78 you are not working on the system console).
80 .Ar duration . Ns Ar pitch | Ar belltype
82 Set the bell duration in milliseconds and pitch in hertz.
85 argument is specified, it may be one of
87 which sets sound parameters back to normal values,
89 which disables the bell entirely, or
91 which sets the bell to visual mode, i.e., flashes the screen instead.
94 is preceded by the word
96 the bell will not be rung when the ringing process is in the background vty.
99 bell, when chosen, applies to all vtys; other bell types
100 can be set individually for each vty.
102 .Ar delay . Ns Ar repeat | Ar speed
106 (250, 500, 750, 1000)
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,
114 argument is specified, it may be one of
122 .It Fl l Ar keymap_file
123 Install keyboard map file from
125 You may load the keyboard map file from a menu-driven command,
127 The format of keyboard map files is documented in the
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
136 .It Fl f Ar # Ar string
137 Set function key number
141 Refer to the man page for the keyboard driver
144 for available function keys and their numbers.
146 Set function keys back to the standard definitions.
148 Use hexadecimal numbers in keyboard map dump.
150 Print brief information about the keyboard.
152 Disconnect the keyboard from the console.
155 option below to associate a keyboard with the console again.
156 .It Fl k Ar keyboard_device
157 Use the specified device as the console keyboard.
158 When using this option, the standard input of the
160 process should be redirected from
162 if you are not working on the system console
166 .It Fl L Ar keymap_file
167 Load keyboard map file from
171 compiled from it to stdout.
172 This option is primarily intended for programmers and is probably
173 of little use under normal circumstances.
176 The environment variable
178 can hold an alternative path to the keyboard map files.
179 .Sh KEYBOARD CONFIGURATION
180 .Ss Boot Time Configuration
181 You may set variables in
184 .Pa /etc/rc.conf.local
185 in order to configure the keyboard at boot time.
186 The following is the list of relevant variables.
188 .Bl -tag -width foo_bar_var -compact
190 Specifies a keyboard map file for the
194 Sets the keyboard repeat rate for the
198 Lists function key strings for the
206 .Ss Driver Configuration
207 The keyboard device driver may let you change default configuration
208 options, such as the default keyboard map, so that you do not need to set up
209 the options at boot time.
210 See keyboard driver manuals
216 .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
217 .It Pa /usr/share/syscons/keymaps/*
218 keyboard map files for syscons
219 .It Pa /usr/share/vt/keymaps/*
220 keyboard map files for vt
223 The following command will load the keyboard map file
224 .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
226 .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
228 So long as the keyboard map file resides in
229 .Pa /usr/share/syscons/keymaps
232 .Pa /usr/share/vt/keymaps
235 you may abbreviate the file name as
239 uses Unicode, the corresponding keyboard file names omit the encoding
240 and typically are just a country code, e.g.\&
243 .Dl kbdcontrol -l ru.koi8-r
245 The following command will make the function key 10 emit "telnet myhost".
247 .Dl kbdcontrol -f 10 \&"telnet myhost\&"
249 In order to get the visual effect for bell, but prevent the screen
250 from flashing if the bell is to ring in the background screen,
251 run the following command.
253 .Dl kbdcontrol -b quiet.visual
255 To change the default console keyboard to another keyboard,
256 for example the first USB keyboard (see
258 use the following command.
260 .Dl kbdcontrol -k /dev/ukbd0 < /dev/console
262 To switch back to the default keyboard, use this command.
264 .Dl kbdcontrol -k /dev/kbd0
266 To allow using both the second USB keyboard and the first AT keyboard
267 at the same time on console via the
269 driver, use the following sequence of commands.
270 .Bd -literal -offset indent
271 kbdcontrol -K < /dev/console
272 kbdcontrol -a atkbd0 < /dev/kbdmux0
273 kbdcontrol -a ukbd1 < /dev/kbdmux0
274 kbdcontrol -k /dev/kbdmux0 < /dev/console
289 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org