Module Name: src Committed By: wiz Date: Wed Mar 30 11:35:26 UTC 2011
Modified Files: src/usr.bin/usbhidctl: usbhidctl.1 Log Message: Add long example describing how to find and configure multimedia keys; based on Mihai Chelaru's description on current-users in February. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/usbhidctl/usbhidctl.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/usbhidctl/usbhidctl.1 diff -u src/usr.bin/usbhidctl/usbhidctl.1:1.22 src/usr.bin/usbhidctl/usbhidctl.1:1.23 --- src/usr.bin/usbhidctl/usbhidctl.1:1.22 Wed Apr 30 13:11:01 2008 +++ src/usr.bin/usbhidctl/usbhidctl.1 Wed Mar 30 11:35:25 2011 @@ -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 @@ 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 ,