]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ukbd.4
This commit was generated by cvs2svn to compensate for changes in r53024,
[FreeBSD/FreeBSD.git] / share / man / man4 / ukbd.4
1 .\" Copyright (c) 1997, 1998
2 .\"     Nick Hibma <hibma@skylink.it>. 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. 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.
18 .\"
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.
30 .\"
31 .\"     $FreeBSD$
32 .\" $FreeBSD$
33 .\"
34 .Dd April 11, 1999
35 .Dt UKBD 4 i386
36 .Os FreeBSD
37 .Sh NAME
38 .Nm ukbd
39 .Nd USB keyboard driver
40 .Sh SYNOPSIS
41 .Cd "device ukbd0"
42 .Sh DESCRIPTION
43 The
44 .Nm
45 driver provides support for keyboards that attach to the USB port.
46 .Nm usb
47 and one of
48 .Nm uhci
49 or
50 .Nm ohci
51 must be configured in the kernel as well.
52 .Sh CONFIGURATION
53 By default the keyboard subsystem does not create the appropriate devices yet.
54 Make sure you configure compile the kernel with the following option in the
55 kernel config file:
56 .Bd -literal -offset indent
57 options "KBD_INSTALL_CDEV"
58 .Ed
59 .Pp
60 Go to /dev and make device nodes kbd*:
61 .Bd -literal -offset indent
62 sh MAKEDEV kbd0 kbd1
63 .Ed
64 .Pp
65 If both an AT keyboard as well as USB keyboards are used at the same time, the
66 AT keyboard will appear as kbd0 in /dev. The USB keyboards will be kbd1, kbd2,
67 etc. You can see some information about the keyboard with the following command:
68 .Bd -literal -offset indent
69 kbdcontrol -i < /dev/kbd1 
70 .Ed
71 .Pp
72 or load a keymap with
73 .Bd -literal -offset indent
74 kbdcontrol -l keymaps/pt.iso < /dev/kbd1
75 .Ed
76 .Pp
77 See
78 .Nm kbcontrol
79 for more possible options.
80 .Pp
81 You can swap console keyboards by using the command
82 .Bd -literal -offset indent
83 kbdcontrol -k /dev/kbd1
84 .Ed
85 .Pp
86 From this point on onwards the first USB keyboard will be the keyboard
87 to be used as the console.
88 .Pp
89 If you want to use a USB keyboard as your default and not use an AT keyboard at
90 all, you will have to remove the
91 .Nm atkbd0
92 from the kernel configuration file. Because of the order of the device 
93 initialisation, the USB keyboard will be detected AFTER the console driver
94 initialises itself and you have to explicitly tellthe console
95 driver to use the existence of the USB keyboard.  This can be done in
96 one of the following two ways.
97 .Pp
98 Run the following command as a part of system initialization:
99 .Bd -literal -offset indent
100 kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null
101 .Ed
102 .Pp
103 (Note that as the USB keyboard is the only keyboard, it is accessed as
104 /dev/kbd0) or otherwise tell the console driver to periodically look for a
105 keyboard by setting a flag in the kernel configuration file:
106 .Bd -literal -offset indent
107 device sc0 at isa? flags 0x100
108 .Ed
109 .Pp
110 With the above flag, the console driver will try to detect any
111 keyboard in the system if it didn't detect one while it was
112 initialized at boot time.
113 .Sh DRIVER CONFIGURATION
114 .Bd -literal -offset indent
115 options "KBD_INSTALL_CDEV"
116 .Ed
117 .Pp
118 Make the keyboards available through a character device in /dev
119 .Bd -literal -offset indent
120 options "UKBD_DFLT_KEYMAP"
121 makeoptions "UKBD_DFLT_KEYMAP=fr.iso"
122 .Ed
123 .Pp
124 The above lines will put the French ISO keymap in the ukbd driver.
125 You can specify any keymap in /usr/share/syscons/keymaps with this
126 option.
127 .Bd -literal -offset indent
128 options "KBD_DISABLE_KEYMAP_LOADING"
129 .Ed
130 .Pp
131 Don't allow the user to change the keymap.  Note that this options
132 also has effect on the AT keyboard driver `atkbd'.
133 .Sh FILES
134 .Bl -tag -width /dev/kbd0 -compact
135 .It Pa /dev/kbd*
136 blocking device nodes
137 .Sh EXAMPLE
138 .Bd -literal -offset indent
139 device ukbd0
140 .Ed
141 .Pp
142 Add the
143 .Nm ukbd
144 driver to the kernel.
145 .Sh SEE ALSO
146 .Xr kbdcontrol 1 ,
147 .Xr ohci 4 ,
148 .Xr syscons 4 ,
149 .Xr uhci 4 ,
150 .Xr usb 4 ,
151 .Xr config 8
152 .\".Sh HISTORY
153 .Sh AUTHORS
154 The
155 .Nm ukbd
156 driver was written by
157 .An Lennart Augustsson Aq augustss@cs.chalmers.se
158 for
159 .Nx
160 and was substantially rewritten for
161 .Fx
162 by
163 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
164 .Pp
165 This manual page was written by
166 .An Nick Hibma Aq hibma@skylink.it
167 with a large amount of input from
168 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .