On Mon, Nov 26, 2012 at 11:55:15AM +0100, Matthieu Herrb wrote:
> On Sun, Nov 25, 2012 at 08:17:06PM +0100, Alexandre Ratchov wrote:
> > Currently audio hotkeys keys invoke the audio driver code to
> > raise/lower the volume. The hot key is not consumed, and is send to
> > X which generates XF86XK_Audio{Lower,Raise}Volume, which in turn
> > are consumed by programs, which in turn change the volume a second
> > time, and we end up with a messed volume. Furthermore hot keys are
> > auto-repeated in X but on in the wskbd layer, which makes the
> > volume changes even more confusing.
> > 
> > IMO, we have to chose: either hot keys are consumed by the kernel
> > to adjust the volume or they are passed to X.
> > 
> > The diff below, is to make hot keys adjust the volume without
> > propagating events to X.
> > 
> > This can be tested on non-thinkpad and non-asus laptops. For
> > instance start a video in mplayer and press the hot-keys; with this
> > diff hot keys should adjust the hardware volume only instead of
> > both the hardware volume and the mplayer softvol.
> 
> That sounds generally sounds like a bad idea to me, altough I've no
> idea how to solve that easily without a complex notification mechanism
> and tons of policy... so it's probably ok for now.

could you elaborate more; I'm not very aware of how X handles this;
how are volume keys supposed to work to your opinion?

>  
> will sio_onvol(3) be notified of changes done with the volume keys ?

Not yet; the long term plan is make hotkeys (not necessarily the
174/176 keys which most keyboards lack) generate master volume MIDI
events that sndiod could use (this way hotkeys work for the default
device rather than the first one). This requires some thinking and
I'm still not convinced it's the right thing to do.

-- Alexandre

Reply via email to