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.
14 .\" $FreeBSD: src/usr.sbin/kbdcontrol/kbdcontrol.1,v 1.18.2.9 2001/08/16 15:56:00 ru Exp $
16 .Dd September 12, 2009
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
38 .Op Fl k Ar keyboard_device
39 .Op Fl L Ar keymap_file
43 command is used to set various keyboard related options for the
45 console driver and the keyboard drivers,
46 such as key map, keyboard repeat and delay rates, bell
49 Keyboard options may be automatically configured at system boot time by
53 .Sx Boot Time Configuration
56 The following command line options are supported:
57 .Bl -tag -width indent
59 Detach the keyboard, specified by the keyboard device name, from the keyboard
61 When using this option, the standard input of the
63 process should be redirected from the keyboard multiplexer keyboard device
64 (if the keyboard multiplexer is not the active keyboard) or
66 (if the keyboard multiplexer is the active keyboard and
67 you are not working on the system console).
69 Attach the keyboard, specified by the keyboard device name, to the keyboard
71 When using this option, the standard input of the
73 process should be redirected from the keyboard multiplexer keyboard device
74 (if the keyboard multiplexer is not the active keyboard) or
76 (if the keyboard multiplexer is the active keyboard and
77 you are not working on the system console).
79 .Ar duration . Ns Ar pitch | Ar belltype
81 Set the bell duration in milliseconds and pitch in hertz.
84 argument is specified, it may be one of
86 which sets sound parameters back to normal values,
88 which disables the bell entirely, or
90 which sets the bell to visual mode, i.e., flashes the screen instead.
93 is preceded by the word
95 the bell will not be rung when the ringing process is in the background vty.
98 bell, when chosen, applies to all vtys; other bell types
99 can be set individually for each vty.
101 .Ar delay . Ns Ar repeat | Ar speed
105 (250, 500, 750, 1000)
108 (34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126,
109 136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440,
113 argument is specified, it may be one of
121 .It Fl l Ar keymap_file
122 Install keyboard map file from
124 You may load the keyboard map file from a menu-driven command,
126 The format of keyboard map files is documented in the
130 Dump the current keyboard map onto stdout.
131 The output may be redirected to a file and can be loaded
132 back to the kernel later by the
135 .It Fl f Ar # Ar string
136 Set function key number
140 Refer to the man page for the keyboard driver
143 for available function keys and their numbers.
145 Set function keys back to the standard definitions.
147 Use hexadecimal numbers in keyboard map dump.
149 Set history buffer size to
153 Print brief information about the keyboard.
155 Disconnect the keyboard from the console.
158 option below to associate a keyboard with the console again.
159 .It Fl k Ar keyboard_device
160 Use the specified device as the console keyboard.
161 When using this option, the standard input of the
163 process should be redirected from
165 if you are not working on the system console
169 .It Fl L Ar keymap_file
170 Load keyboard map file from
174 compiled from it to stdout.
175 This option is primarily intended for programmers and is probably
176 of little use under normal circumstances.
179 The environment variable
181 can hold an alternative path to the keyboard map files.
182 .Sh KEYBOARD CONFIGURATION
183 .Ss Boot Time Configuration
184 You may set variables in
187 .Pa /etc/rc.conf.local
188 in order to configure the keyboard at boot time.
189 The following is the list of relevant variables.
191 .Bl -tag -width foo_bar_var -compact
193 Specifies a keyboard map file for the
197 Sets the keyboard repeat rate for the
201 Lists function key strings for the
209 .Ss Driver Configuration
210 The keyboard device driver may let you change default configuration
211 options, such as the default keyboard map, so that you do not need to set up
212 the options at boot time.
213 See keyboard driver manuals
219 .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
220 .It Pa /usr/share/syscons/keymaps/*
224 The following command will load the keyboard map file
225 .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
227 .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
229 So long as the keyboard map file resides in
230 .Pa /usr/share/syscons/keymaps ,
231 you may abbreviate the file name as
234 .Dl kbdcontrol -l ru.koi8-r
236 The following command will make the function key 10 emit "telnet myhost".
238 .Dl kbdcontrol -f 10 \&"telnet myhost\&"
240 In order to get the visual effect for bell, but prevent the screen
241 from flushing if the bell is to ring in the background screen,
242 run the following command.
244 .Dl kbdcontrol -b quiet.visual
246 To change the default console keyboard to another keyboard,
247 for example the first USB keyboard (see
249 use the following commands.
251 .Dl kbdcontrol -k /dev/kbd1 < /dev/console
253 To switch back to the default keyboard, use this command.
255 .Dl kbdcontrol -k /dev/kbd0
268 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org