On Fri, 16 May 2008, Jared D. McNeill wrote:
Michael Lorenz wrote:
My WindowMaker menu is currently intercepting the audio keys  
like this:
SunAudioLowerVolume => mixerctl -nw monitor.master-=2
SunAudioRaiseVolume => mixerctl -nw monitor.master+=2
SunAudioMute        => mixerctl -nw monitor.master=0
... and that works only in WindowMaker. PMF events work everywhere.
The logic I would go with is:
 If X is active
   Deliver keycode
 Else
   Inject PMF event
That way the volume keys JFW on the console, and I can map them to  
the special GNOME volume controls (with fancy UI overlays) when  
I'm running X.
        I'd prefer the default to be left with PMF events and require a
        command to request keycodes to be delivered, so the majority of
        users who do not customise their X config still get working
        volume keys.