diff --git a/usr.bin/usbhidctl/usbhidctl.1 b/usr.bin/usbhidctl/usbhidctl.1 index f4ec1df89085..18eb2d6f4533 100644 --- a/usr.bin/usbhidctl/usbhidctl.1 +++ b/usr.bin/usbhidctl/usbhidctl.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbhidctl.1,v 1.22 2008/04/30 13:11:01 martin Exp $ +.\" $NetBSD: usbhidctl.1,v 1.23 2011/03/30 11:35:25 wiz Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 26, 2006 +.Dd March 30, 2011 .Dt USBHIDCTL 1 .Os .Sh NAME @@ -215,6 +215,30 @@ name is used twice. Each can be individually accessed by providing an instance number. For example, to set the value for the first item: .Dl usbhidctl -f /dev/uhid0 -w 'Consumer_Control.Unassigned#0=1' +.Pp +Another example is configuring multimedia keys on a keyboard. +First you would look in the +.Xr dmesg 8 +output, which +.Xr uhid 4 +devices are attached to the keyboard's +.Xr uhidev 4 +device and use +.Nm +to see how the controls are reported: +.Dl usbhidctl -f /dev/uhidX -lv -a +Then press the special keys; you should see something like +.Dv Consumer:Volume_Up +etc. +Then create a configuration file containing the actions, like: +.Bd -literal -offset indent +Consumer:Volume_Up 1 /usr/pkg/bin/dcop amarok player volumeUp & +Consumer:Volume_Down 1 /usr/pkg/bin/dcop amarok player volumeDown & +Consumer:Mute 1 /usr/pkg/bin/dcop amarok player mute & +.Ed +and use +.Dl usbhidaction -c /path/to/file -f /dev/uhidX +once during your X startup. .Sh SEE ALSO .Xr usbhidaction 1 , .Xr usbhid 3 ,