]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ukbd.4
This commit was generated by cvs2svn to compensate for changes in r56944,
[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 .\"
33 .Dd April 11, 1999
34 .Dt UKBD 4
35 .Os FreeBSD
36 .Sh NAME
37 .Nm ukbd
38 .Nd USB keyboard driver
39 .Sh SYNOPSIS
40 .Cd "device ukbd"
41 .Sh DESCRIPTION
42 The
43 .Nm
44 driver provides support for keyboards that attach to the USB port.
45 .Nm usb
46 and one of
47 .Nm uhci
48 or
49 .Nm ohci
50 must be configured in the kernel as well.
51 .Sh CONFIGURATION
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
54 kernel config file:
55 .Bd -literal -offset indent
56 options "KBD_INSTALL_CDEV"
57 .Ed
58 .Pp
59 Go to /dev and make device nodes kbd*:
60 .Bd -literal -offset indent
61 sh MAKEDEV kbd0 kbd1
62 .Ed
63 .Pp
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 
69 .Ed
70 .Pp
71 or load a keymap with
72 .Bd -literal -offset indent
73 kbdcontrol -l keymaps/pt.iso < /dev/kbd1
74 .Ed
75 .Pp
76 See
77 .Nm kbcontrol
78 for more possible options.
79 .Pp
80 You can swap console keyboards by using the command
81 .Bd -literal -offset indent
82 kbdcontrol -k /dev/kbd1
83 .Ed
84 .Pp
85 From this point on onwards the first USB keyboard will be the keyboard
86 to be used as the console.
87 .Pp
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
90 .Nm atkbd0
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.
96 .Pp
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
100 .Ed
101 .Pp
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
107 .Ed
108 .Pp
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"
115 .Ed
116 .Pp
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"
121 .Ed
122 .Pp
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
125 option.
126 .Bd -literal -offset indent
127 options "KBD_DISABLE_KEYMAP_LOADING"
128 .Ed
129 .Pp
130 Don't allow the user to change the keymap.  Note that this options
131 also has effect on the AT keyboard driver `atkbd'.
132 .Sh FILES
133 .Bl -tag -width /dev/kbd0 -compact
134 .It Pa /dev/kbd*
135 blocking device nodes
136 .Sh EXAMPLE
137 .Bd -literal -offset indent
138 device ukbd0
139 .Ed
140 .Pp
141 Add the
142 .Nm ukbd
143 driver to the kernel.
144 .Sh SEE ALSO
145 .Xr kbdcontrol 1 ,
146 .Xr ohci 4 ,
147 .Xr syscons 4 ,
148 .Xr uhci 4 ,
149 .Xr usb 4 ,
150 .Xr config 8
151 .\".Sh HISTORY
152 .Sh AUTHORS
153 The
154 .Nm ukbd
155 driver was written by
156 .An Lennart Augustsson Aq augustss@cs.chalmers.se
157 for
158 .Nx
159 and was substantially rewritten for
160 .Fx
161 by
162 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
163 .Pp
164 This manual page was written by
165 .An Nick Hibma Aq hibma@skylink.it
166 with a large amount of input from
167 .An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .