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