2 .\" kbdcontrol - a utility for manipulating the syscons 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
44 console driver and the keyboard drivers,
45 such as key map, keyboard repeat and delay rates, bell
48 Keyboard options may be automatically configured at system boot time by
52 .Sx Boot Time Configuration
55 The following command line options are supported:
56 .Bl -tag -width indent
58 Detach the keyboard, specified by the keyboard device name, from the keyboard
60 When using this option, the standard input of the
62 process should be redirected from the keyboard multiplexer keyboard device
63 (if the keyboard multiplexer is not the active keyboard) or
65 (if the keyboard multiplexer is the active keyboard and
66 you are not working on the system console).
68 Attach the keyboard, specified by the keyboard device name, to the keyboard
70 When using this option, the standard input of the
72 process should be redirected from the keyboard multiplexer keyboard device
73 (if the keyboard multiplexer is not the active keyboard) or
75 (if the keyboard multiplexer is the active keyboard and
76 you are not working on the system console).
78 .Ar duration . Ns Ar pitch | Ar belltype
80 Set the bell duration in milliseconds and pitch in hertz.
83 argument is specified, it may be one of
85 which sets sound parameters back to normal values,
87 which disables the bell entirely, or
89 which sets the bell to visual mode, i.e., flashes the screen instead.
92 is preceded by the word
94 the bell will not be rung when the ringing process is in the background vty.
97 bell, when chosen, applies to all vtys; other bell types
98 can be set individually for each vty.
100 .Ar delay . Ns Ar repeat | Ar speed
104 (250, 500, 750, 1000)
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,
112 argument is specified, it may be one of
120 .It Fl l Ar keymap_file
121 Install keyboard map file from
123 You may load the keyboard map file from a menu-driven command,
125 The format of keyboard map files is documented in the
129 Dump the current keyboard map onto stdout.
130 The output may be redirected to a file and can be loaded
131 back to the kernel later by the
134 .It Fl f Ar # Ar string
135 Set function key number
139 Refer to the man page for the keyboard driver
142 for available function keys and their numbers.
144 Set function keys back to the standard definitions.
146 Use hexadecimal numbers in keyboard map dump.
148 Print brief information about the keyboard.
150 Disconnect the keyboard from the console.
153 option below to associate a keyboard with the console again.
154 .It Fl k Ar keyboard_device
155 Use the specified device as the console keyboard.
156 When using this option, the standard input of the
158 process should be redirected from
160 if you are not working on the system console
164 .It Fl L Ar keymap_file
165 Load keyboard map file from
169 compiled from it to stdout.
170 This option is primarily intended for programmers and is probably
171 of little use under normal circumstances.
174 The environment variable
176 can hold an alternative path to the keyboard map files.
177 .Sh KEYBOARD CONFIGURATION
178 .Ss Boot Time Configuration
179 You may set variables in
182 .Pa /etc/rc.conf.local
183 in order to configure the keyboard at boot time.
184 The following is the list of relevant variables.
186 .Bl -tag -width foo_bar_var -compact
188 Specifies a keyboard map file for the
192 Sets the keyboard repeat rate for the
196 Lists function key strings for the
204 .Ss Driver Configuration
205 The keyboard device driver may let you change default configuration
206 options, such as the default keyboard map, so that you do not need to set up
207 the options at boot time.
208 See keyboard driver manuals
214 .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
215 .It Pa /usr/share/syscons/keymaps/*
219 The following command will load the keyboard map file
220 .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
222 .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
224 So long as the keyboard map file resides in
225 .Pa /usr/share/syscons/keymaps ,
226 you may abbreviate the file name as
229 .Dl kbdcontrol -l ru.koi8-r
231 The following command will make the function key 10 emit "telnet myhost".
233 .Dl kbdcontrol -f 10 \&"telnet myhost\&"
235 In order to get the visual effect for bell, but prevent the screen
236 from flushing if the bell is to ring in the background screen,
237 run the following command.
239 .Dl kbdcontrol -b quiet.visual
241 To change the default console keyboard to the another keyboard,
242 for example the first USB keyboard (see
244 use the following commands.
246 .Dl kbdcontrol -k /dev/ukbd0 < /dev/console
248 To switch back to the default keyboard, use this command.
250 .Dl kbdcontrol -k /dev/kbd0
252 To allow using both the second USB keyboard and the first AT keyboard
253 at the same time on console via the
255 driver, use the following sequence of commands.
256 .Bd -literal -offset indent
257 kbdcontrol -K < /dev/console
258 kbdcontrol -a atkbd0 < /dev/kbdmux0
259 kbdcontrol -a ukbd1 < /dev/kbdmux0
260 kbdcontrol -k /dev/kbdmux0 < /dev/console
274 .An S\(/oren Schmidt Aq sos@FreeBSD.org