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