1 .\" $NetBSD: kbd.4,v 1.8 2002/01/15 02:03:07 wiz Exp $
3 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Paul Kranenburg.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd Sun workstation keyboard
37 .Cd "pseudo-device kbd"
41 driver provides an interface to the workstation console keyboard.
47 keyboards are supported.
50 keyboard is treated as if it were a
52 All types generate keycodes encoding the
53 key identity and motion (up or down) as the keys are pressed and released.
56 driver either passes the keycodes to an application as they come in, or
59 characters first according to a set of built-in tables.
61 If the keyboard is configured as the device
62 to be used for system console input
64 it will be internally connected to the
66 device special file, which can be used as a
70 The device special file
72 is used to get direct access to the keyboard input stream.
74 ioctl's are supported (mostly just enough to keep the
77 .Bl -tag -width KIOCSDIRECT
80 The argument is of type
82 the only value supported is
83 .Dv TR_UNTRANS_EVENT .
86 The argument is of type
91 Fill in old-style key station translation.
92 The argument is of type
93 .Fa "struct okiockey *" .
95 Send a command to the keyboard.
96 The argument is of type
98 and can have one of the following values:
99 .Bl -tag -width KBD_CMD_NOCLICK
101 Start the keyboard beeper.
103 Stop the keyboard beeper.
105 Instruct the keyboard to make extra noise when touching keys.
107 Instruct the keyboard to stop making extra noise when touching keys.
111 The argument is of type
113 in which one of the values
120 Route the keyboard input stream through the
122 compatible event module.
123 The argument is of type
125 a non-zero value will put the driver into
127 mode, while a value of zero will make it return to
128 .Dq ASCII translation
131 Set key station translation.
132 The argument is of type
133 .Fa "struct kiockey *"
134 .Pq see Pa /usr/include/machine/kbio.h No for more details .
136 Get key station translation.
137 The argument is of type
138 .Fa "struct kiockey *" .
141 .Pq Do type 4 Dc only .
142 The argument is of type
144 in which the uninterpreted result of the
146 keyboard command is returned
148 type keyboards this will be the setting of a DIP switch bank
152 .Pq Do type 4 Dc only .
153 The argument is of type
155 and is the inclusive OR of the following flags:
157 .Bl -tag -width LED_SCROLL_LOCK -compact
164 Each of these flags turn on the LED in the obvious key.
167 .Pq Do type 4 Dc only .
168 The argument is of type
170 in which the current LED state is returned.
178 is hardwired to the built-in
180 serial port at 1200 bps.