diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2004-04-03 21:01:26 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2004-04-03 21:01:26 +0000 |
commit | ca60886a8383fa821faaae41b93a715dbc25da26 (patch) | |
tree | 9eb4a85f1df773d97e0a68dfbc393b3ca23e532e /usr.bin | |
parent | 1c528a5cbd178e2cd235593f2969b4c93fc033e0 (diff) |
- correct SYNOPSIS
- sync usage()
- some small tweaks
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/usbhidaction/usbhidaction.1 | 10 | ||||
-rw-r--r-- | usr.bin/usbhidaction/usbhidaction.c | 6 | ||||
-rw-r--r-- | usr.bin/usbhidctl/usbhid.c | 10 | ||||
-rw-r--r-- | usr.bin/usbhidctl/usbhidctl.1 | 29 |
4 files changed, 27 insertions, 28 deletions
diff --git a/usr.bin/usbhidaction/usbhidaction.1 b/usr.bin/usbhidaction/usbhidaction.1 index 5bbca06ec34..3e1ec85246d 100644 --- a/usr.bin/usbhidaction/usbhidaction.1 +++ b/usr.bin/usbhidaction/usbhidaction.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usbhidaction.1,v 1.4 2003/06/10 09:12:12 jmc Exp $ +.\" $OpenBSD: usbhidaction.1,v 1.5 2004/04/03 21:01:25 jmc Exp $ .\" $NetBSD: usbhidaction.1,v 1.6 2002/01/18 14:38:59 augustss Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,11 +43,9 @@ .Nd perform actions according to USB HID controls .Sh SYNOPSIS .Nm +.Op Fl div .Fl c Ar config-file -.Op Fl d -.Op Fl i .Fl f Ar device -.Op Fl v .Ar arg ... .Sh DESCRIPTION .Nm @@ -63,8 +61,6 @@ The options are as follows: Specify a path name for the config file. .It Fl d Toggle the daemon flag. -.It Fl i -Ignore HID items in the config file that do not exist in the device. .It Fl f Ar device Specify a path name for the device to operate on. If @@ -73,6 +69,8 @@ is numeric, it is taken to be the USB HID device number. If it is a relative path, it is taken to be the name of the device under .Pa /dev . An absolute path is taken to be the literal device pathname. +.It Fl i +Ignore HID items in the config file that do not exist in the device. .It Fl v Be verbose, and do not become a daemon. .El diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c index e7783fc2055..83c9433f9d2 100644 --- a/usr.bin/usbhidaction/usbhidaction.c +++ b/usr.bin/usbhidaction/usbhidaction.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbhidaction.c,v 1.2 2002/06/11 06:16:36 jsyn Exp $ */ +/* $OpenBSD: usbhidaction.c,v 1.3 2004/04/03 21:01:25 jmc Exp $ */ /* $NetBSD: usbhidaction.c,v 1.7 2002/01/18 14:38:59 augustss Exp $ */ /* @@ -205,8 +205,8 @@ usage(void) { extern char *__progname; - fprintf(stderr, "Usage: %s -c config_file [-d] -f hid_dev " - "[-i] [-v]\n", __progname); + fprintf(stderr, "Usage: %s [-div] -c config-file -f device " + "arg ...\n", __progname); exit(1); } diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index 83dd7f7abf7..99cc70bf3f4 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbhid.c,v 1.4 2002/05/10 00:09:17 nate Exp $ */ +/* $OpenBSD: usbhid.c,v 1.5 2004/04/03 21:01:25 jmc Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* @@ -759,15 +759,15 @@ usage(void) { extern char *__progname; - fprintf(stderr, "Usage: %s -f device [-t tablefile] [-l] [-v] -a\n", + fprintf(stderr, "Usage: %s -f device [-t table] [-lv] -a\n", __progname); - fprintf(stderr, " %s -f device [-t tablefile] [-v] -r\n", + fprintf(stderr, " %s -f device [-t table] [-v] -r\n", __progname); fprintf(stderr, - " %s -f device [-t tablefile] [-l] [-n] [-v] name ...\n", + " %s -f device [-t table] [-lnv] name ...\n", __progname); fprintf(stderr, - " %s -f device [-t tablefile] -w name=value ...\n", + " %s -f device [-t table] -w name=value ...\n", __progname); exit(1); } diff --git a/usr.bin/usbhidctl/usbhidctl.1 b/usr.bin/usbhidctl/usbhidctl.1 index 2b78014892b..2ea3e7a6274 100644 --- a/usr.bin/usbhidctl/usbhidctl.1 +++ b/usr.bin/usbhidctl/usbhidctl.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usbhidctl.1,v 1.7 2003/07/02 09:11:51 jmc Exp $ +.\" $OpenBSD: usbhidctl.1,v 1.8 2004/04/03 21:01:25 jmc Exp $ .\" $NetBSD: usbhidctl.1,v 1.14 2001/12/28 17:49:32 augustss Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,29 +45,23 @@ .Nm .Fl f Ar device .Op Fl t Ar table -.Op Fl l -.Op Fl v +.Op Fl lv .Fl a -.Pp .Nm .Fl f Ar device .Op Fl t Ar table .Op Fl v .Fl r -.Pp .Nm .Fl f Ar device .Op Fl t Ar table -.Op Fl l -.Op Fl n -.Op Fl v -.Op Ar item ... -.Pp +.Op Fl lnv +.Op Ar name ... .Nm .Fl f Ar device .Op Fl t Ar table .Fl w -.Op Ar item=value ... +.Op Ar name Ns = Ns Ar value ... .Sh DESCRIPTION .Nm can be used to output or modify the state of a USB HID (Human Interface Device). @@ -110,9 +104,6 @@ Repeating this option increases verbosity. Change item values. Only 'output' and 'feature' kinds can be set with this option. .El -.Sh FILES -.Pa /usr/share/misc/usb_hid_usages -The default HID usage table. .Sh SYNTAX .Nm parses the names of items specified on the command line against the human @@ -143,9 +134,16 @@ As an alternative notation in items on the command line, the native numeric value for the page name or usage can be used instead of the full human readable page name or usage name. Numeric values can be specified in decimal, octal or hexadecimal. +.Sh FILES +.Bl -tag -width "/usr/share/misc/usb_hid_usages" +.It Pa /usr/share/misc/usb_hid_usages +The default HID usage table. +.El .Sh EXAMPLES On a standard USB mouse the item +.Pp .Dl Generic_Desktop:Mouse.Generic_Desktop:Pointer.Button:Button_2 +.Pp reflects the current status of button 2. The .Qq button 2 @@ -168,6 +166,7 @@ An item can generally be named by omitting one or more of the page names. For example the .Qq button 2 item would usually just be referred to on the command line as: +.Pp .Dl $ usbhidctl -f /dev/mouse Mouse.Pointer.Button_2 .Pp Items can also be named by referring to parts of the item name with the @@ -180,6 +179,7 @@ page is 1, and the usage identifier for the usage is 2, so the following can be used to refer to the .Qq button 2 item: +.Pp .Dl $ usbhidctl -f /dev/mouse 1:Mouse.1:Pointer.Button:2 .Pp Devices with human interface outputs can be manipulated with the @@ -190,6 +190,7 @@ control as usage 2 under page 0xffff, in the .Qq Mouse collection. The following can be used to switch this LED off: +.Pp .Dl $ usbhidctl -f /dev/mouse -w Mouse.0xffff:2=0 .Sh SEE ALSO .Xr usbhidaction 1 , |