2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH HID 7D "May 13, 2017"
8 hid \- Human interface device (HID) class driver
12 \fBkeyboard@unit-address\fR
13 \fBmouse@unit-address\fR
14 \fBinput@unit-address:consumer_control\fR
15 \fB#include <sys/hid.h>\fR
16 \fBint ioctl(int fildes, int command, ... /*arg*/);\fR
21 The \fBhid\fR driver is a USBA (Solaris USB Architecture) compliant client
22 driver that supports the \fIHuman Interface Device Class (HID) 1.0\fR
23 specification. The Human Interface Device (HID) class encompasses devices
24 controlled by humans to operate computer systems. Typical examples of HID
25 devices include keyboards, mice, trackballs, and joysticks. HID also covers
26 front-panel controls such as knobs, switches, and buttons. A USB device with
27 multiple interfaces may have one interface for audio and a HID interface to
28 define the buttons that control the audio.
31 The \fBhid\fR driver is general and primarily handles the USB functionality of
32 the device and generic HID functionality. For example, HID interfaces are
33 required to have an interrupt pipe for the device to send data packets, and the
34 \fBhid\fR driver opens the pipe to the interrupt endpoint and starts polling.
35 The \fBhid\fR driver is also responsible for managing the device through the
36 default control pipe. In addition to being a USB client driver, the \fBhid\fR
37 driver is also a STREAMS driver so that modules may be pushed on top of it.
40 The HID specification is flexible, and HID devices dynamically describe their
41 packets and other parameters through a HID report descriptor. The HID parser is
42 a misc module that parses the HID report descriptor and creates a database of
43 information about the device. The \fBhid\fR driver queries the HID parser to
44 find out the type and characteristics of the HID device. The HID specification
45 predefines packet formats for the boot protocol keyboard and mouse.
49 \fB\fBHIDIOCKMGDIRECT\fR\fR
52 This ioctl should only be addressed to a USB keyboard or mouse device. The
53 \fBhid\fR driver maintains two streams for each USB keyboard/mouse instance: an
54 internal one for the use of the kernel and an external one for the use of user
55 applications. This ioctl returns the information of which stream gets the input
58 \fIarg\fR must point to a variable of \fBint\fR type. Upon return, \fB0\fR
59 means the internal stream gets the input, \fB1\fR means the external stream
66 \fB\fBHIDIOCKMSDIRECT\fR\fR
69 This ioctl should only be addressed to a USB keyboard or mouse device. The hid
70 driver maintains two streams for each USB keyboard/mouse instance: an internal
71 one for the use of the kernel and an external one for the use of user
72 applications. This ioctl sets which stream should get the input for the moment.
74 \fIarg\fR must point to a variable of \fBint\fR type. The argument \fB0\fR
75 means the internal stream gets the input, \fB1\fR means the external stream
82 \fB\fB/kernel/drv/hid\fR\fR
86 32-bit x86 ELF kernel hid module
92 \fB\fB/kernel/drv/amd64/hid\fR\fR
96 64-bit x86 ELF kernel hid module
102 \fB\fB/kernel/drv/sparcv9/hid\fR\fR
106 64-bit SPARC ELF kernel hid module
112 \fB\fB/kernel/misc/hidparser\fR\fR
116 32-bit x86 ELF kernel hidparser module
122 \fB\fB/kernel/misc/amd64/hidparser\fR\fR
126 64-bit x86 ELF kernel hidparser module
132 \fB\fB/kernel/misc/sparcv9/hidparser\fR\fR
136 64-bit SPARC ELF kernel hidparser module
141 See \fBattributes\fR(5) for descriptions of the following attributes:
149 ATTRIBUTE TYPE ATTRIBUTE VALUE
151 Architecture SPARC, x86, PCI-based systems
156 \fBcfgadm_usb\fR(8), \fBattributes\fR(5), \fBusba\fR(7D), \fBvirtualkm\fR(7D)
159 \fIWriting Device Drivers\fR
162 \fISTREAMS Programming Guide\fR
165 \fIUniversal Serial Bus Specification 1.0 and 1.1\fR
168 \fIDevice Class Definition for Human Interface Devices (HID) 1.1\fR
171 \fISystem Administration Guide: Basic Administration\fR
175 \fBhid_attach: Unsupported HID device.\fR
179 The device requires a protocol not supported by the hid driver.
185 \fBParsing of hid descriptor failed.\fR
189 The HID report descriptor cannot be parsed correctly. The device cannot be
190 supported by the hid driver.
196 \fBInvalid report descriptor.\fR
200 The HID report descriptor is invalid. The device cannot be supported by the hid
206 The following messages may be logged into the system log. They are formatted in
207 the following manner:
211 <device path><hid<instance number>): message...
219 \fBhid_attach: Unsupported HID device.\fR
223 The device cannot be supported by this version of the HID driver.
229 \fBParsing of HID descriptor failed.\fR
233 The device cannot be supported by this version of the HID driver.
239 \fBInvalid report descriptor.\fR
243 The device cannot be supported by this version of the HID driver.
248 The hid driver currently supports only keyboard, mouse and audio HID control
252 Normally a mouse is not power managed and consequently, screen darkening can be
253 undone with a mouse movement. If power management of the mouse is required, add
254 the following line to \fBhid.conf\fR then reboot the system:
264 Modern mice that are power managed require a 'click' to wake up. Occasionally,
265 this may cause unexpected results.