Merge branch 'vendor/MDOCML'
[dragonfly.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. 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: src/share/man/man4/ukbd.4,v 1.10.2.10 2002/10/27 11:35:14 ceri Exp $
32 .\"
33 .Dd August 6, 2009
34 .Dt UKBD 4
35 .Os
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 .Xr usb 4
46 and one of
47 .Xr uhci 4
48 or
49 .Xr ohci 4
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 reconfigure your kernel with the following option in the kernel
54 config file:
55 .Pp
56 .D1 Cd "options KBD_INSTALL_CDEV"
57 .Pp
58 If both an AT keyboard USB keyboards are used at the same time, the
59 AT keyboard will appear as
60 .Pa kbd0
61 in
62 .Pa /dev .
63 The USB keyboards will be
64 .Pa kbd1 , kbd2 ,
65 etc.
66 You can see some information about the keyboard with the following command:
67 .Pp
68 .Dl "kbdcontrol -i < /dev/kbd1"
69 .Pp
70 or load a keymap with
71 .Pp
72 .Dl "kbdcontrol -l keymaps/pt.iso < /dev/kbd1"
73 .Pp
74 See
75 .Xr kbdcontrol 1
76 for more possible options.
77 .Pp
78 You can swap console keyboards by using the command
79 .Pp
80 .Dl "kbdcontrol -k /dev/kbd1"
81 .Pp
82 From this point on, the first USB keyboard will be the keyboard
83 to be used by the console.
84 .Pp
85 If you want to use a USB keyboard as your default and not use an AT keyboard at
86 all, you will have to remove the
87 .Cd "device atkbd"
88 line from the kernel configuration file.
89 Because of the device initialization order,
90 the USB keyboard will be detected
91 .Em after
92 the console driver
93 initializes itself and you have to explicitly tell the 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 .Pp
99 .Dl "kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null"
100 .Pp
101 (Note that as the USB keyboard is the only keyboard, it is accessed as
102 .Pa /dev/kbd0 )
103 or otherwise tell the console driver to periodically look for a
104 keyboard by setting a flag in the kernel configuration file:
105 .Pp
106 .Dl "device sc0 at isa? flags 0x100"
107 .Pp
108 With the above flag, the console driver will try to detect any
109 keyboard in the system if it did not detect one while it was
110 initialized at boot time.
111 .Sh DRIVER CONFIGURATION
112 .D1 Cd "options KBD_INSTALL_CDEV"
113 .Pp
114 Make the keyboards available through a character device in
115 .Pa /dev .
116 .Pp
117 .D1 Cd options UKBD_DFLT_KEYMAP
118 .D1 Cd makeoptions UKBD_DFLT_KEYMAP=fr.iso
119 .Pp
120 The above lines will put the French ISO keymap in the ukbd driver.
121 You can specify any keymap in
122 .Pa /usr/share/syscons/keymaps
123 with this option.
124 .Pp
125 .D1 Cd "options KBD_DISABLE_KEYMAP_LOAD"
126 .Pp
127 Do not allow the user to change the keymap.
128 Note that these options also affect the AT keyboard driver,
129 .Xr atkbd 4 .
130 .Sh FILES
131 .Bl -tag -width ".Pa /dev/kbd*" -compact
132 .It Pa /dev/kbd*
133 blocking device nodes
134 .El
135 .Sh EXAMPLES
136 .D1 Cd "device ukbd"
137 .Pp
138 Add the
139 .Nm
140 driver to the kernel.
141 .Sh SEE ALSO
142 .Xr kbdcontrol 1 ,
143 .Xr ohci 4 ,
144 .Xr syscons 4 ,
145 .Xr uhci 4 ,
146 .Xr usb 4 ,
147 .Xr config 8
148 .Sh AUTHORS
149 .An -nosplit
150 The
151 .Nm
152 driver was written by
153 .An Lennart Augustsson Aq Mt augustss@cs.chalmers.se
154 for
155 .Nx
156 and was substantially rewritten for
157 .Fx
158 by
159 .An Kazutaka YOKOTA Aq Mt yokota@zodiac.mech.utsunomiya-u.ac.jp .
160 .Pp
161 This manual page was written by
162 .An Nick Hibma Aq Mt n_hibma@FreeBSD.org
163 with a large amount of input from
164 .An Kazutaka YOKOTA Aq Mt yokota@zodiac.mech.utsunomiya-u.ac.jp .