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. Neither the name of the author nor the names of any co-contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL NICK HIBMA OR THE VOICES IN HIS HEAD 20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26.\" THE POSSIBILITY OF SUCH DAMAGE. 27.\" 28.\" $FreeBSD$ 29.\" 30.Dd April 11, 1999 31.Dt UKBD 4 32.Os 33.Sh NAME 34.Nm ukbd 35.Nd USB keyboard driver 36.Sh SYNOPSIS 37.Cd "device ukbd" 38.Sh DESCRIPTION 39The 40.Nm 41driver provides support for keyboards that attach to the USB port. 42.Xr usb 4 43and one of 44.Xr uhci 4 45or 46.Xr ohci 4 47must be configured in the kernel as well. 48.Sh CONFIGURATION 49By default, the keyboard subsystem does not create the appropriate devices yet. 50Make sure you reconfigure your kernel with the following option in the kernel 51config file: 52.Pp 53.Dl "options KBD_INSTALL_CDEV" 54.Pp 55If both an AT keyboard USB keyboards are used at the same time, the 56AT keyboard will appear as 57.Pa kbd0 58in 59.Pa /dev . 60The USB keyboards will be 61.Pa kbd1 , kbd2 , 62etc. 63You can see some information about the keyboard with the following command: 64.Pp 65.Dl "kbdcontrol -i < /dev/kbd1" 66.Pp 67or load a keymap with 68.Pp 69.Dl "kbdcontrol -l keymaps/pt.iso < /dev/kbd1" 70.Pp 71See 72.Xr kbdcontrol 1 73for more possible options. 74.Pp 75You can swap console keyboards by using the command 76.Pp 77.Dl "kbdcontrol -k /dev/kbd1" 78.Pp 79From this point on, the first USB keyboard will be the keyboard 80to be used by the console. 81.Pp 82If you want to use a USB keyboard as your default and not use an AT keyboard at 83all, you will have to remove the 84.Cd "device atkbd" 85line from the kernel configuration file. 86Because of the device initialization order, 87the USB keyboard will be detected 88.Em after 89the console driver 90initializes itself and you have to explicitly tell the console 91driver to use the existence of the USB keyboard. This can be done in 92one of the following two ways. 93.Pp 94Run the following command as a part of system initialization: 95.Pp 96.Dl "kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null" 97.Pp 98(Note that as the USB keyboard is the only keyboard, it is accessed as 99.Pa /dev/kbd0 ) 100or otherwise tell the console driver to periodically look for a 101keyboard by setting a flag in the kernel configuration file: 102.Pp 103.Dl "device sc0 at isa? flags 0x100" 104.Pp 105With the above flag, the console driver will try to detect any 106keyboard in the system if it did not detect one while it was 107initialized at boot time. 108.Sh DRIVER CONFIGURATION 109.D1 Cd "options KBD_INSTALL_CDEV" 110.Pp 111Make the keyboards available through a character device in 112.Pa /dev . 113.Pp 114.D1 Cd options UKBD_DFLT_KEYMAP 115.D1 Cd makeoptions UKBD_DFLT_KEYMAP=fr.iso 116.Pp 117The above lines will put the French ISO keymap in the ukbd driver. 118You can specify any keymap in 119.Pa /usr/share/syscons/keymaps 120with this option. 121.Pp 122.D1 Cd "options KBD_DISABLE_KEYMAP_LOADING" 123.Pp 124Do not allow the user to change the keymap. 125Note that these options also affect the AT keyboard driver, 126.Xr atkbd 4 . 127.Sh FILES 128.Bl -tag -width ".Pa /dev/kbd*" -compact 129.It Pa /dev/kbd* 130blocking device nodes 131.El 132.Sh EXAMPLES 133.D1 Cd "device ukbd" 134.Pp 135Add the 136.Nm 137driver to the kernel. 138.Sh SEE ALSO 139.Xr kbdcontrol 1 , 140.Xr ohci 4 , 141.Xr syscons 4 , 142.Xr uhci 4 , 143.Xr usb 4 , 144.Xr config 8 145.Sh AUTHORS 146.An -nosplit 147The 148.Nm 149driver was written by 150.An Lennart Augustsson Aq augustss@cs.chalmers.se 151for 152.Nx 153and was substantially rewritten for 154.Fx 155by 156.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp . 157.Pp 158This manual page was written by 159.An Nick Hibma Aq n_hibma@FreeBSD.org 160with a large amount of input from 161.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp . 162