Subject: Re: USB keyboard extra keys
To: Jesse Peterson <jpeterson275@comcast.net>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 08/03/2007 08:47:21
On Thu, 2 Aug 2007 23:41:26 -0700
Jesse Peterson <jpeterson275@comcast.net> wrote:

> Hello,
> 
> I've got a USB keyboard with extra/non-standard keys (things like
> volume control, internet & email buttons, etc) and am wondering how
> to get them working in X11. I run amd64/3.1
> 
> I'd imagine that there may need to be support in wscons for these
> extra keys and possibly a keyboard driver if the control of such keys
> is proprietary. I tried to take a look at /usr/X11R6/bin/xev but no
> extra keys (in fact even the function keys weren't showing up) would
> cause events.
> 
> So: has anybody seen "extra" keys work? If so could you point me in a
> direction?
> 
Generally, most of these extra keys are actually part of a separate USB
device, but you have to verify that.  Here's what I had when I was
using a USB keyboard:


$ grep usb .xinitrc
usbhidaction -f 0 -c /home/smb/.hidconf
$ cat .hidconf
Consumer:Consumer_Control.Consumer:Volume_Up                       1
   mixerctl -n -w outputs.master++
Consumer:Consumer_Control.Consumer:Volume_Down                     1
   mixerctl -n -w outputs.master--
Consumer:Consumer_Control.Consumer:Mute                            1
   /home/smb/bin/domute
Consumer:Consumer_Control.Consumer:AC_Home                         1
   rfirefox about:blank &
Consumer:Consumer_Control.Consumer:AC_Search                       1
   rfirefox http://www.google.com &
Consumer:Consumer_Control.Consumer:AL_Calculator                   1
   xterm -e bc &
Consumer:Consumer_Control.Consumer:AL_Email_Reader                 1
   composemail


		--Steve Bellovin, http://www.cs.columbia.edu/~smb