]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/usbhidctl/usbhidctl.1
Revert "Build clang and other llvm executables as PIE"
[FreeBSD/FreeBSD.git] / usr.bin / usbhidctl / usbhidctl.1
1 .\" $NetBSD: usbhidctl.1,v 1.8 1999/05/11 21:03:58 augustss Exp $
2 .\"
3 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
5 .\"
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Lennart Augustsson.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
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.
17 .\"
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.
29 .\"
30 .Dd August 1, 2011
31 .Dt USBHIDCTL 1
32 .Os
33 .Sh NAME
34 .Nm usbhidctl
35 .Nd manipulate USB HID devices
36 .Sh SYNOPSIS
37 .Nm
38 .Fl f Ar device
39 .Op Fl t Ar table
40 .Op Fl v
41 .Op Fl x
42 .Fl r
43 .Nm
44 .Fl f Ar device
45 .Op Fl t Ar table
46 .Op Fl l
47 .Op Fl v
48 .Op Fl x
49 .Op Fl z
50 .Fl a
51 .Nm
52 .Fl f Ar device
53 .Op Fl t Ar table
54 .Op Fl l
55 .Op Fl n
56 .Op Fl v
57 .Op Fl x
58 .Op Fl z
59 .Ar item ...
60 .Nm
61 .Fl f Ar device
62 .Op Fl t Ar table
63 .Op Fl v
64 .Op Fl z
65 .Fl w
66 .Ar item=value ...
67 .Sh DESCRIPTION
68 The
69 .Nm
70 utility can be used to dump and modify the state of a USB HID (Human
71 Interface Device).
72 Each named
73 .Ar item
74 is printed.
75 If the
76 .Fl w
77 flag is specified
78 .Nm
79 attempts to set the specified items to the given values.
80 .Pp
81 The options are as follows:
82 .Bl -tag -width Ds
83 .It Fl a
84 Show all items and their current values if device returns.
85 .It Fl f Ar device
86 Specify a path name for the device to operate on.
87 .It Fl l
88 Loop and dump the device data every time it changes.
89 .It Fl n
90 Suppress printing of the item name.
91 .It Fl r
92 Dump the report descriptor.
93 .It Fl t Ar table
94 Specify a path name for the HID usage table file.
95 .It Fl v
96 Be verbose.
97 .It Fl w
98 Change item values.
99 Only 'output' and 'feature' kinds can be set with this option.
100 .It Fl x
101 Dump data in hexadecimal as well as decimal.
102 .It Fl z
103 Reset reports to zero before processing other arguments.
104 If not specified, current values will be requested from device.
105 .El
106 .Sh SYNTAX
107 .Nm
108 compares the names of items specified on the command line against the human
109 interface items reported by the USB device.
110 Each human interface item is mapped from its native form to a human readable
111 name, using the HID usage table file.
112 Command line items are compared with the generated item names,
113 and the USB HID device is operated on when a match is found.
114 .Pp
115 Each human interface item is named by the
116 .Qq page
117 it appears in, the
118 .Qq usage
119 within that page, and the list of
120 .Qq collections
121 containing the item.
122 Each collection in turn is also identified by page, and
123 the usage within that page.
124 .Pp
125 On the
126 .Nm
127 command line the page name is separated from the usage name with the character
128 .Sq Cm \&: .
129 The collections are separated by the character
130 .Sq Cm \&. .
131 .Pp
132 Some devices give the same name to more than one item.
133 .Nm
134 supports isolating each item by appending a
135 .Sq Cm \&# .
136 character and a decimal item instance number, starting at zero.
137 .Sh FILES
138 .Bl -tag -width 30n
139 .It Pa /usr/share/misc/usb_hid_usages
140 The default HID usage table.
141 .El
142 .Sh SEE ALSO
143 .Xr usbhid 3 ,
144 .Xr uhid 4 ,
145 .Xr usb 4
146 .Sh HISTORY
147 The
148 .Nm
149 command appeared in
150 .Nx 1.4 .