1 .\" $NetBSD: hil.4,v 1.10 2003/06/27 18:26:36 wiz Exp $
3 .\" Copyright (c) 1990, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" This code is derived from software contributed to Berkeley by
7 .\" the Systems Programming Group of the University of Utah Computer
8 .\" Science Department.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" from: @(#)hil.4 8.2 (Berkeley) 11/30/93
41 .Nd Human Interface Link device driver
45 The Human Interface Link
47 is the interface used by the Series
48 300 computers to connect devices such as keyboards, mice, control knobs,
51 modules to the machine.
59 is an artifact of a never-completed interface and is not currently
60 useful for anything. In the current implementation, only one keyboard
61 can be used for text-mode interaction via the
63 interface; other keyboards, if any, are accessible only via their
65 interfaces, as described here.
67 The device file that corresponds to a particular
70 by the order of the devices on the loop. For instance, if an
73 is the second physical device on the loop, then
76 file that should be used for communication with that module.
80 device is begun with an
82 system call. A process may open a device already opened by another
83 process unless the existing process is operating in
86 in which case it requires exclusive use of the device, or
87 another process has the device open and is using
94 In the current implementation,
96 style access is the only supported access method. This interface uses
98 calls to receive packets of data representing events. (An interface
99 using a memory area shared between the kernel and the user process was
100 partially implemented, and remnants of it can be found in the include
101 files and the driver, but it does not work and probably will be
102 completely dropped in favor of a console interface providing better
103 cross-port consistency.)
105 To receive events from a device, a user process uses
107 to open the device, then uses the
109 ioctl (see below) to request
111 style access. Then data obtained with
113 consists of a stream of packets, each of which has a five-byte header
114 consisting of a one-byte length (including the header) and a four-byte
115 timestamp, which is measured in hundredths of a second since some fixed
116 reference point. The timestamp is stored in host-native byte order;
121 or equivalent will give a useful result. Following this header is zero
122 or more bytes, as received from the device. This manual page documents
123 this data only minimally; see PACKET FORMAT below.
124 .\" Need someone who knows to write authoritative doc for device data!
127 may be used in the usual way to detect input data.
130 is used to control the
133 The ioctl commands (which unfortunately are defined in an include file,
134 .Pa /usr/src/sys/arch/hp300/dev/hilioctl.h ,
135 not normally installed under
137 are as follows. Many of these are functionally identical to ioctls
140 .Bl -tag -width HILIOCARO
142 Identify and Describe
144 The device will return up to 11 bytes of information describing the
145 type and characteristics of the device.
146 At the very least, 2 bytes of information,
149 and the Describe Record Header will be returned.
157 Request the security code record from a device. The security code can
158 vary from 1 byte to 15, and is only supported by some
168 An ascii string of up to 15 bytes in length that describes the device
177 An ascii string of up to 15 bytes in length that describes the current
178 status of the device is returned.
186 Additional information of up to 15 bytes is returned describing the device.
187 This ioctl is similar to
189 which must be used first
190 to determine if the device supports extended describe.
198 Turn off auto repeat on the keyboard while it is in cooked mode.
206 Turn on auto repeat on the keyboard while it is in raw mode.
207 The repeat rate is set to 1/30th of a second.
215 Turn on auto repeat on the keyboard while it is in raw mode.
216 The repeat rate is set to 1/60th of a second.
222 The following ioctls are specific to this implementation:
226 Generate a keyboard beep as defined by
229 is a pointer to two bytes of information;
230 the first is the duration of the beep (microseconds),
231 the second is the frequency of the beep (Hertz).
233 Use HP-UX Read Interface
237 semantics for gathering data from this device. This call must be used
238 before anything can be read from the descriptor.
241 When reading data from a device, events are received as data packets,
242 with a header as described above. Here we provide (very rudimentary)
243 documentation for the format of the device-dependent data, for at least
244 one type of mouse and keyboard (specifically, the 46060A two-button
245 mechanical mouse and 46021A keyboard); other mice and keyboards may or
248 The first byte of data is a bitmask. Only two bits have known meaning:
249 .Bl -tag -width 0x123
251 The data portion contains mouse motion deltas, two signed 8-bit
252 quantities, X delta first.
254 The data portion contains a key or mouse button up/down event, one
255 byte. The low bit is 0 if the event is a
259 event. The other seven bits identify the key or button, according to
263 If both bits are set, the mouse deltas appear before the button byte.
265 The known identifying values for key/button events are (only the 0xfe
268 .\" Growl. The .Sm manipulations simply don't work, and I don't know
269 .\" how to get a double-quote or backslash to work. So I name all the
270 .\" special characters...what I want to write is something like,
277 .\" to get "The =/+ key" with the = and + set .Li style.
278 .Bl -tag -width 0x123 -compact
298 4, on the numeric keypad.
300 8, on the numeric keypad.
302 5, on the numeric keypad.
304 9, on the numeric keypad.
306 6, on the numeric keypad.
308 7, on the numeric keypad.
310 The comma key on the numeric keypad.
313 on the numeric keypad.
315 1, on the numeric keypad
317 The slash key on the numeric keypad.
319 2, on the numeric keypad.
321 The plus key on the numeric keypad.
323 3, on the numeric keypad.
325 The asterisk key on the numeric keypad.
327 0, on the numeric keypad.
329 The minus key on the numeric keypad.
345 The second (counting from the left) of the four unmarked keys at the
348 The third (counting from the left) of the four unmarked keys at the top
351 The period key on the numeric keypad.
353 The leftmost of the four unmarked keys at the top right.
357 key on the numeric keypad.
359 The rightmost of the four unmarked keys at the top right.
391 The digit-7 / ampersand key.
393 The digit-6 / circumflex key.
395 The digit-5 / percent-sign key.
397 The digit-4 / dollar-sign key.
399 The digit-3 / hash-mark key.
401 The digit-2 / at-sign key.
403 The digit-1 / exclamation-point key.
405 The backquote / tilde key.
443 The digit-8 / asterisk key.
445 The digit-9 / left-parenthesis key.
447 The digit-0 / right-parenthesis key.
449 The minus-sign / underscore key.
451 The equal-sign / plus-sign key.
465 The left-bracket / left-brace key.
467 The right-bracket / right-brace key.
469 The backslash / vertical-bar key.
481 The semicolon / colon key.
483 The single-quote / double-quote key.
487 The arrow key pointing up and left.
493 The period / less-than key.
495 The comma / greater-than key.
497 The slash / question-mark key.
507 The left-pointing arrow key.
509 The down-pointing arrow key.
511 The up-pointing arrow key.
513 The right-pointing arrow key.
516 .Bl -tag -width /dev/hil[1-7] -compact
523 .Bl -tag -width [EINVAL]
525 No such HIL loop device.
527 HIL loop is inoperative.
529 Another HP-UX process has the device open, or another
532 device open, and is using it in
543 to be able to read anything is gross. It is probably not worth fixing,
544 though, because the whole hil/ite mechanism will probably be replaced
545 with a more-or-less port-independent scheme in the foreseeable future.