]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - share/man/man4/ukbd.4
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / share / man / man4 / ukbd.4
1 .\" Copyright (c) 1997, 1998
2 .\"     Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
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 .\" 3. Neither the name of the author nor the names of any co-contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"   without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD
20 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26 .\" THE POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD$
29 .\"
30 .Dd November 22, 2006
31 .Dt UKBD 4
32 .Os
33 .Sh NAME
34 .Nm ukbd
35 .Nd USB keyboard driver
36 .Sh SYNOPSIS
37 To compile this driver into the kernel,
38 place the following line in your
39 kernel configuration file:
40 .Bd -ragged -offset indent
41 .Cd "device ukbd"
42 .Ed
43 .Pp
44 Alternatively, to load the driver as a
45 module at boot time, place the following line in
46 .Xr loader.conf 5 :
47 .Bd -literal -offset indent
48 ukbd_load="YES"
49 .Ed
50 .Sh DESCRIPTION
51 The
52 .Nm
53 driver provides support for keyboards that attach to the USB port.
54 .Xr usb 4
55 and one of
56 .Xr uhci 4
57 or
58 .Xr ohci 4
59 must be configured in the kernel as well.
60 .Sh CONFIGURATION
61 By default, the keyboard subsystem does not create the appropriate devices yet.
62 Make sure you reconfigure your kernel with the following option in the kernel
63 config file:
64 .Pp
65 .Dl "options KBD_INSTALL_CDEV"
66 .Pp
67 If both an AT keyboard USB keyboards are used at the same time, the
68 AT keyboard will appear as
69 .Pa kbd0
70 in
71 .Pa /dev .
72 The USB keyboards will be
73 .Pa kbd1 , kbd2 ,
74 etc.
75 You can see some information about the keyboard with the following command:
76 .Pp
77 .Dl "kbdcontrol -i < /dev/kbd1"
78 .Pp
79 or load a keymap with
80 .Pp
81 .Dl "kbdcontrol -l keymaps/pt.iso < /dev/kbd1"
82 .Pp
83 See
84 .Xr kbdcontrol 1
85 for more possible options.
86 .Pp
87 You can swap console keyboards by using the command
88 .Pp
89 .Dl "kbdcontrol -k /dev/kbd1"
90 .Pp
91 From this point on, the first USB keyboard will be the keyboard
92 to be used by the console.
93 .Pp
94 If you want to use a USB keyboard as your default and not use an AT keyboard at
95 all, you will have to remove the
96 .Cd "device atkbd"
97 line from the kernel configuration file.
98 Because of the device initialization order,
99 the USB keyboard will be detected
100 .Em after
101 the console driver
102 initializes itself and you have to explicitly tell the console
103 driver to use the existence of the USB keyboard.
104 This can be done in
105 one of the following two ways.
106 .Pp
107 Run the following command as a part of system initialization:
108 .Pp
109 .Dl "kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null"
110 .Pp
111 (Note that as the USB keyboard is the only keyboard, it is accessed as
112 .Pa /dev/kbd0 )
113 or otherwise tell the console driver to periodically look for a
114 keyboard by setting a flag in the kernel configuration file:
115 .Pp
116 .Dl "device sc0 at isa? flags 0x100"
117 .Pp
118 With the above flag, the console driver will try to detect any
119 keyboard in the system if it did not detect one while it was
120 initialized at boot time.
121 .Sh DRIVER CONFIGURATION
122 .D1 Cd "options KBD_INSTALL_CDEV"
123 .Pp
124 Make the keyboards available through a character device in
125 .Pa /dev .
126 .Pp
127 .D1 Cd options UKBD_DFLT_KEYMAP
128 .D1 Cd makeoptions UKBD_DFLT_KEYMAP=fr.iso
129 .Pp
130 The above lines will put the French ISO keymap in the ukbd driver.
131 You can specify any keymap in
132 .Pa /usr/share/syscons/keymaps
133 with this option.
134 .Pp
135 .D1 Cd "options KBD_DISABLE_KEYMAP_LOADING"
136 .Pp
137 Do not allow the user to change the keymap.
138 Note that these options also affect the AT keyboard driver,
139 .Xr atkbd 4 .
140 .Sh FILES
141 .Bl -tag -width ".Pa /dev/kbd*" -compact
142 .It Pa /dev/kbd*
143 blocking device nodes
144 .El
145 .Sh EXAMPLES
146 .D1 Cd "device ukbd"
147 .Pp
148 Add the
149 .Nm
150 driver to the kernel.
151 .Sh SEE ALSO
152 .Xr kbdcontrol 1 ,
153 .Xr ohci 4 ,
154 .Xr syscons 4 ,
155 .Xr uhci 4 ,
156 .Xr usb 4 ,
157 .Xr config 8
158 .Sh AUTHORS
159 .An -nosplit
160 The
161 .Nm
162 driver was written by
163 .An Lennart Augustsson Aq augustss@cs.chalmers.se
164 for
165 .Nx
166 and was substantially rewritten for
167 .Fx
168 by
169 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
170 .Pp
171 This manual page was written by
172 .An Nick Hibma Aq n_hibma@FreeBSD.org
173 with a large amount of input from
174 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .