1999-04-11 00:15:40 +00:00
|
|
|
.\" Copyright (c) 1997, 1998
|
2000-10-26 15:30:44 +00:00
|
|
|
.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
|
1999-04-11 00:15:40 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by Bill Paul.
|
|
|
|
.\" 4. Neither the name of the author nor the names of any co-contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
.\" THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2001-12-18 09:40:22 +00:00
|
|
|
.\" $FreeBSD$
|
1999-04-11 00:15:40 +00:00
|
|
|
.\"
|
|
|
|
.Dd April 11, 1999
|
1999-11-15 23:14:32 +00:00
|
|
|
.Dt UKBD 4
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
1999-04-11 00:15:40 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ukbd
|
|
|
|
.Nd USB keyboard driver
|
|
|
|
.Sh SYNOPSIS
|
2000-01-23 16:13:26 +00:00
|
|
|
.Cd "device ukbd"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver provides support for keyboards that attach to the USB port.
|
2001-12-18 09:40:22 +00:00
|
|
|
.Xr usb 4
|
1999-04-11 00:15:40 +00:00
|
|
|
and one of
|
2001-12-18 09:40:22 +00:00
|
|
|
.Xr uhci 4
|
1999-04-11 00:15:40 +00:00
|
|
|
or
|
2001-12-18 09:40:22 +00:00
|
|
|
.Xr ohci 4
|
1999-04-11 00:15:40 +00:00
|
|
|
must be configured in the kernel as well.
|
|
|
|
.Sh CONFIGURATION
|
2001-12-18 09:40:22 +00:00
|
|
|
By default, the keyboard subsystem does not create the appropriate devices yet.
|
2000-07-19 23:07:42 +00:00
|
|
|
Make sure you reconfigure your kernel with the following option in the kernel
|
|
|
|
config file:
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
2001-12-18 09:40:22 +00:00
|
|
|
.Dl "options KBD_INSTALL_CDEV"
|
|
|
|
.Pp
|
|
|
|
Go to
|
|
|
|
.Pa /dev
|
|
|
|
and make device nodes
|
|
|
|
.Pa kbd* :
|
|
|
|
.Pp
|
|
|
|
.Dl "sh MAKEDEV kbd0 kbd1"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
2002-08-27 16:18:07 +00:00
|
|
|
If both an AT keyboard USB keyboards are used at the same time, the
|
2001-12-18 09:40:22 +00:00
|
|
|
AT keyboard will appear as
|
|
|
|
.Pa kbd0
|
|
|
|
in
|
|
|
|
.Pa /dev .
|
|
|
|
The USB keyboards will be
|
|
|
|
.Pa kbd1 , kbd2 ,
|
2000-03-01 14:50:24 +00:00
|
|
|
etc.
|
|
|
|
You can see some information about the keyboard with the following command:
|
2001-12-18 09:40:22 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "kbdcontrol -i < /dev/kbd1"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
or load a keymap with
|
2001-12-18 09:40:22 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "kbdcontrol -l keymaps/pt.iso < /dev/kbd1"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
See
|
2001-12-18 09:40:22 +00:00
|
|
|
.Xr kbdcontrol 1
|
1999-04-11 00:15:40 +00:00
|
|
|
for more possible options.
|
|
|
|
.Pp
|
|
|
|
You can swap console keyboards by using the command
|
|
|
|
.Pp
|
2001-12-18 09:40:22 +00:00
|
|
|
.Dl "kbdcontrol -k /dev/kbd1"
|
|
|
|
.Pp
|
2002-08-27 16:18:07 +00:00
|
|
|
From this point on, the first USB keyboard will be the keyboard
|
|
|
|
to be used by the console.
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
If you want to use a USB keyboard as your default and not use an AT keyboard at
|
|
|
|
all, you will have to remove the
|
2001-12-18 09:40:22 +00:00
|
|
|
.Cd "device atkbd"
|
|
|
|
line from the kernel configuration file.
|
2002-08-27 16:18:07 +00:00
|
|
|
Because of the device initialization order,
|
|
|
|
the USB keyboard will be detected
|
2001-12-18 09:40:22 +00:00
|
|
|
.Em after
|
|
|
|
the console driver
|
|
|
|
initializes itself and you have to explicitly tell the console
|
1999-04-11 00:15:40 +00:00
|
|
|
driver to use the existence of the USB keyboard. This can be done in
|
|
|
|
one of the following two ways.
|
|
|
|
.Pp
|
|
|
|
Run the following command as a part of system initialization:
|
2001-12-18 09:40:22 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
(Note that as the USB keyboard is the only keyboard, it is accessed as
|
2001-12-18 09:40:22 +00:00
|
|
|
.Pa /dev/kbd0 )
|
|
|
|
or otherwise tell the console driver to periodically look for a
|
1999-04-11 00:15:40 +00:00
|
|
|
keyboard by setting a flag in the kernel configuration file:
|
2001-12-18 09:40:22 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "device sc0 at isa? flags 0x100"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
With the above flag, the console driver will try to detect any
|
2001-12-18 09:40:22 +00:00
|
|
|
keyboard in the system if it did not detect one while it was
|
1999-04-11 00:15:40 +00:00
|
|
|
initialized at boot time.
|
|
|
|
.Sh DRIVER CONFIGURATION
|
2001-12-18 09:40:22 +00:00
|
|
|
.D1 Cd "options KBD_INSTALL_CDEV"
|
|
|
|
.Pp
|
|
|
|
Make the keyboards available through a character device in
|
|
|
|
.Pa /dev .
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
2001-12-18 09:40:22 +00:00
|
|
|
.D1 Cd options UKBD_DFLT_KEYMAP
|
2002-10-20 15:19:40 +00:00
|
|
|
.D1 Cd makeoptions UKBD_DFLT_KEYMAP=fr.iso
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
1999-04-11 12:21:47 +00:00
|
|
|
The above lines will put the French ISO keymap in the ukbd driver.
|
2001-12-18 09:40:22 +00:00
|
|
|
You can specify any keymap in
|
|
|
|
.Pa /usr/share/syscons/keymaps
|
|
|
|
with this option.
|
|
|
|
.Pp
|
|
|
|
.D1 Cd "options KBD_DISABLE_KEYMAP_LOADING"
|
|
|
|
.Pp
|
|
|
|
Do not allow the user to change the keymap.
|
|
|
|
Note that these options also affect the AT keyboard driver,
|
2001-07-16 10:52:19 +00:00
|
|
|
.Xr atkbd 4 .
|
1999-04-11 00:15:40 +00:00
|
|
|
.Sh FILES
|
2001-12-18 09:40:22 +00:00
|
|
|
.Bl -tag -width ".Pa /dev/kbd*" -compact
|
1999-04-11 12:21:47 +00:00
|
|
|
.It Pa /dev/kbd*
|
|
|
|
blocking device nodes
|
2000-12-29 09:18:45 +00:00
|
|
|
.El
|
2000-11-17 11:44:16 +00:00
|
|
|
.Sh EXAMPLES
|
2001-12-18 09:40:22 +00:00
|
|
|
.D1 Cd "device ukbd"
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
Add the
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1999-04-11 00:15:40 +00:00
|
|
|
driver to the kernel.
|
|
|
|
.Sh SEE ALSO
|
1999-04-11 12:21:47 +00:00
|
|
|
.Xr kbdcontrol 1 ,
|
1999-04-11 00:15:40 +00:00
|
|
|
.Xr ohci 4 ,
|
1999-08-15 10:48:36 +00:00
|
|
|
.Xr syscons 4 ,
|
1999-04-11 12:21:47 +00:00
|
|
|
.Xr uhci 4 ,
|
1999-04-11 00:15:40 +00:00
|
|
|
.Xr usb 4 ,
|
1999-08-15 10:48:36 +00:00
|
|
|
.Xr config 8
|
|
|
|
.Sh AUTHORS
|
2000-11-22 09:35:58 +00:00
|
|
|
.An -nosplit
|
1999-04-11 00:15:40 +00:00
|
|
|
The
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1999-04-11 00:15:40 +00:00
|
|
|
driver was written by
|
1999-04-11 12:21:47 +00:00
|
|
|
.An Lennart Augustsson Aq augustss@cs.chalmers.se
|
1999-08-15 10:48:36 +00:00
|
|
|
for
|
|
|
|
.Nx
|
|
|
|
and was substantially rewritten for
|
|
|
|
.Fx
|
|
|
|
by
|
1999-04-11 14:28:54 +00:00
|
|
|
.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
|
1999-04-11 00:15:40 +00:00
|
|
|
.Pp
|
|
|
|
This manual page was written by
|
2000-10-26 15:30:44 +00:00
|
|
|
.An Nick Hibma Aq n_hibma@FreeBSD.org
|
1999-04-11 14:28:54 +00:00
|
|
|
with a large amount of input from
|
|
|
|
.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
|