Initial import from FreeBSD RELENG_4:
[dragonfly.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: src/usr.sbin/kbdcontrol/kbdcontrol.1,v 1.18.2.9 2001/08/16 15:56:00 ru Exp $
15 .\"
16 .Dd June 30, 1999
17 .Dt KBDCONTROL 1
18 .Os
19 .Sh NAME
20 .Nm kbdcontrol
21 .Nd a utility for manipulating the syscons console driver
22 .Sh SYNOPSIS
23 .Nm
24 .Op Fl dFKix
25 .Oo
26 .Fl b
27 .Ar duration . Ns Ar pitch | Ar belltype
28 .Oc
29 .Oo
30 .Fl r
31 .Ar delay . Ns Ar repeat | Ar speed
32 .Oc
33 .Op Fl l Ar keymap_file
34 .Op Fl f Ar # Ar string
35 .Op Fl h Ar size
36 .Op Fl k Ar keyboard_device
37 .Op Fl L Ar keymap_file
38 .Sh DESCRIPTION
39 The
40 .Nm
41 command is used to set various keyboard related options for the
42 .Xr syscons 4
43 console driver and the keyboard drivers,
44 such as key map, keyboard repeat and delay rates, bell
45 characteristics etc.
46 .Pp
47 Keyboard options may be automatically configured at system boot time by
48 setting variables in
49 .Pa /etc/rc.conf .
50 See
51 .Sx Boot Time Configuration
52 below.
53 .Pp
54 The following command line options are supported:
55 .Bl -tag -width indent
56 .It Fl b Xo
57 .Ar duration . Ns Ar pitch | Ar belltype
58 .Xc
59 Set the bell duration in milliseconds and pitch in hertz.
60 If a
61 .Ar belltype
62 argument is specified, it may be one of
63 .Cm normal
64 which sets sound parameters back to normal values,
65 .Cm off
66 which disables the bell entirely, or
67 .Cm visual
68 which sets the bell to visual mode, i.e. flashes the screen instead.
69 If
70 .Ar belltype
71 is preceded by the word
72 .Cm quiet. ,
73 the bell will not be rung when the ringing process is in the background vty.
74 .It Fl r Xo
75 .Ar delay . Ns Ar repeat | Ar speed
76 .Xc
77 Set keyboard
78 .Ar delay
79 (250, 500, 750, 1000)
80 and
81 .Ar repeat
82 (34, 38, 42, 46, 50, 55, 59, 63, 68, 76, 84, 92, 100, 110, 118, 126,
83 136, 152, 168, 184, 200, 220, 236, 252, 272, 304, 336, 368, 400, 440,
84 472, 504)
85 rates, or if a
86 .Ar speed
87 argument is specified, it may be one of
88 .Cm slow
89 (1000.504),
90 .Cm fast
91 (250.34)
92 or
93 .Cm normal
94 (500.126).
95 .It Fl l Ar keymap_file
96 Install keyboard map file from
97 .Ar keymap_file .
98 You may load the keyboard map file from a menu-driven command,
99 .Xr kbdmap 1 .
100 .It Fl d
101 Dump the current keyboard map onto stdout.
102 The output may be redirected to a file and can be loaded
103 back to the kernel later by the
104 .Fl l
105 option above.
106 .It Fl f Ar # Ar string
107 Set function key number
108 .Ar #
109 to send
110 .Ar string .
111 Refer to the man page for the keyboard driver
112 (e.g.\&
113 .Xr atkbd 4 )
114 for available function keys and their numbers.
115 .It Fl F
116 Set function keys back to the standard definitions.
117 .It Fl x
118 Use hexadecimal numbers in keyboard map dump.
119 .It Fl h Ar size
120 Set history buffer size to
121 .Ar size
122 lines.
123 .It Fl i
124 Print brief information about the keyboard.
125 .It Fl K
126 Disconnect the keyboard from the console.
127 You need to use the
128 .Fl k
129 option below to associate a keyboard with the console again.
130 .It Fl k Ar keyboard_device
131 Use the specified device as the console keyboard.
132 When using this option, the standard input of the
133 .Nm
134 process should be redirected from
135 .Pa /dev/console
136 if you are not working on the system console
137 (see the
138 .Sx EXAMPLES
139 section).
140 .It Fl L Ar keymap_file
141 Load keyboard map file from
142 .Ar keymap_file
143 and write the
144 .Ft "struct keymap"
145 compiled from it to stdout.
146 This option is primarily intended for programmers and is probably
147 of little use under normal circumstances.
148 .El
149 .Sh KEYBOARD CONFIGURATION
150 .Ss Boot Time Configuration
151 You may set variables in
152 .Pa /etc/rc.conf
153 or
154 .Pa /etc/rc.conf.local
155 in order to configure the keyboard at boot time.
156 The following is the list of relevant variables.
157 .Pp
158 .Bl -tag -width foo_bar_var -compact
159 .It Ar keymap
160 Specifies a keyboard map file for the
161 .Fl l
162 option.
163 .It Ar keyrate
164 Sets the keyboard repeat rate for the
165 .Fl r
166 option.
167 .It Ar keychange
168 Lists function key strings for the
169 .Fl f
170 option.
171 .El
172 .Pp
173 See
174 .Xr rc.conf 5
175 for details.
176 .Ss Driver Configuration
177 The keyboard device driver may let you change default configuration
178 options, such as the default keyboard map, so that you do not need to set up
179 the options at boot time.
180 See keyboard driver manuals
181 (e.g.\&
182 .Xr atkbd 4 ,
183 .Xr ukbd 4 )
184 for details.
185 .Sh FILES
186 .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact
187 .It Pa /usr/share/syscons/keymaps/*
188 keyboard map files
189 .El
190 .Sh EXAMPLES
191 The following command will load the keyboard map file
192 .Pa /usr/share/syscons/keymaps/ru.koi8-r.kbd .
193 .Pp
194 .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd
195 .Pp
196 So long as the keyboard map file resides in
197 .Pa /usr/share/syscons/keymaps ,
198 you may abbreviate the file name as
199 .Pa ru.koi8-r .
200 .Pp
201 .Dl kbdcontrol -l ru.koi8-r
202 .Pp
203 The following command will make the function key 10 emit "telnet myhost".
204 .Pp
205 .Dl kbdcontrol -f 10 \&"telnet myhost\&"
206 .Pp
207 In order to get the visual effect for bell, but prevent the screen
208 from flushing if the bell is to ring in the background screen,
209 run the following command.
210 .Pp
211 .Dl kbdcontrol -b quiet.visual
212 .Pp
213 To change the default console keyboard to the another keyboard,
214 for example the first USB keyboard (see
215 .Xr ukbd 4 ) ,
216 use the following commands.
217 .Pp
218 .Dl kbdcontrol -k /dev/kbd1 < /dev/console
219 .Pp
220 To switch back to the default keyboard, use this command.
221 .Pp
222 .Dl kbdcontrol -k /dev/kbd0
223 .Sh BUGS
224 Report when found.
225 .Sh SEE ALSO
226 .Xr kbdmap 1 ,
227 .Xr vidcontrol 1 ,
228 .Xr atkbd 4 ,
229 .Xr keyboard 4 ,
230 .Xr screen 4 ,
231 .Xr syscons 4 ,
232 .Xr ukbd 4 ,
233 .Xr kbdmap 5 ,
234 .Xr rc.conf 5
235 .Sh AUTHORS
236 .An S\(/oren Schmidt Aq sos@FreeBSD.org