Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/usbhidctl Add long example describing how to find an...



details:   https://anonhg.NetBSD.org/src/rev/bb1e1efb2627
branches:  trunk
changeset: 763667:bb1e1efb2627
user:      wiz <wiz%NetBSD.org@localhost>
date:      Wed Mar 30 11:35:25 2011 +0000

description:
Add long example describing how to find and configure multimedia
keys; based on Mihai Chelaru's description on current-users in February.
Bump date.

diffstat:

 usr.bin/usbhidctl/usbhidctl.1 |  28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r 761caa3e6e22 -r bb1e1efb2627 usr.bin/usbhidctl/usbhidctl.1
--- a/usr.bin/usbhidctl/usbhidctl.1     Wed Mar 30 11:10:56 2011 +0000
+++ b/usr.bin/usbhidctl/usbhidctl.1     Wed Mar 30 11:35:25 2011 +0000
@@ -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 ,



Home | Main Index | Thread Index | Old Index