Add long example describing how to find and configure multimedia

keys; based on Mihai Chelaru's description on current-users in February.
Bump date.
This commit is contained in:
wiz 2011-03-30 11:35:25 +00:00
parent 7c248362c1
commit c51b743b1e

View File

@ -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 ,