1 .\" Copyright (c) 1997, 1998
2 .\" Nick Hibma <hibma@skylink.it>. All rights reserved.
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.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by Bill Paul.
15 .\" 4. Neither the name of the author nor the names of any co-contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD
23 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 .\" THE POSSIBILITY OF SUCH DAMAGE.
38 .Nd USB keyboard driver
44 driver provides support for keyboards that attach to the USB port.
50 must be configured in the kernel as well.
52 By default the keyboard subsystem does not create the appropriate devices yet.
53 Make sure you configure compile the kernel with the following option in the
55 .Bd -literal -offset indent
56 options "KBD_INSTALL_CDEV"
59 Go to /dev and make device nodes kbd*:
60 .Bd -literal -offset indent
64 If both an AT keyboard as well as USB keyboards are used at the same time, the
65 AT keyboard will appear as kbd0 in /dev. The USB keyboards will be kbd1, kbd2,
66 etc. You can see some information about the keyboard with the following command:
67 .Bd -literal -offset indent
68 kbdcontrol -i < /dev/kbd1
72 .Bd -literal -offset indent
73 kbdcontrol -l keymaps/pt.iso < /dev/kbd1
78 for more possible options.
80 You can swap console keyboards by using the command
81 .Bd -literal -offset indent
82 kbdcontrol -k /dev/kbd1
85 From this point on onwards the first USB keyboard will be the keyboard
86 to be used as the console.
88 If you want to use a USB keyboard as your default and not use an AT keyboard at
89 all, you will have to remove the
91 from the kernel configuration file. Because of the order of the device
92 initialisation, the USB keyboard will be detected AFTER the console driver
93 initialises itself and you have to explicitly tellthe console
94 driver to use the existence of the USB keyboard. This can be done in
95 one of the following two ways.
97 Run the following command as a part of system initialization:
98 .Bd -literal -offset indent
99 kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null
102 (Note that as the USB keyboard is the only keyboard, it is accessed as
103 /dev/kbd0) or otherwise tell the console driver to periodically look for a
104 keyboard by setting a flag in the kernel configuration file:
105 .Bd -literal -offset indent
106 device sc0 at isa? flags 0x100
109 With the above flag, the console driver will try to detect any
110 keyboard in the system if it didn't detect one while it was
111 initialized at boot time.
112 .Sh DRIVER CONFIGURATION
113 .Bd -literal -offset indent
114 options "KBD_INSTALL_CDEV"
117 Make the keyboards available through a character device in /dev
118 .Bd -literal -offset indent
119 options "UKBD_DFLT_KEYMAP"
120 makeoptions "UKBD_DFLT_KEYMAP=fr.iso"
123 The above lines will put the French ISO keymap in the ukbd driver.
124 You can specify any keymap in /usr/share/syscons/keymaps with this
126 .Bd -literal -offset indent
127 options "KBD_DISABLE_KEYMAP_LOADING"
130 Don't allow the user to change the keymap. Note that this options
131 also has effect on the AT keyboard driver `atkbd'.
133 .Bl -tag -width /dev/kbd0 -compact
135 blocking device nodes
137 .Bd -literal -offset indent
143 driver to the kernel.
155 driver was written by
156 .An Lennart Augustsson Aq augustss@cs.chalmers.se
157 for NetBSD and was substantially rewritten for FreeBSD by
158 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
160 This manual page was written by
161 .An Nick Hibma Aq hibma@skylink.it
162 with a large amount of input from
163 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .