Port-sparc64 archive

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

Re: Volume control buttons



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On May 15, 2008, at 20:13, Pierre Pronchery wrote:

On 2008-05-15, Michael Lorenz <macallan%netbsd.org@localhost> wrote:
some Sun keyboards have keys to control audio volume and brightness -
we could have them send PMF events instead and teach audio drivers to
listen for them so volume control via keyboard would work out of the
box without any additional voodoo.
Any objections?

If you want to go this way, it should be enough to have them send PMF
events. I think it is more appropriate to let the user decide how this
should interact with the system. Moreover, mixerctl is easy to script
(see below).

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.

To me this looks better than directly teaching the audio drivers about it.

I'd teach the audio drivers to listen to PMF events, nothing else. Many of them will have to learn that anyway and having a knob to switch the keyboard driver between sending wskbd and PMF events isn't exactly complicated either.

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBSCzWKMpnzkX8Yg2nAQIL3wf9F7bufRqBLCvFO0s6c52jCxCZ8F45A9p9
P1NoXHPsYeLHG+Xc7rYuWRhAYyNi4jDjjCDSxyBCencxkkBsUftN3JzeiDDxR2f7
2sebgVGGQKXH5AC0wKhXOh4J1rNYfUbjHefocbJ+Nri9aFYJCbQh6nhZRdnyk8wi
26oxFshqx9dkOVTTf7abw9EzgxIhxbiocKlHSgLy2lGsn52pA1eudLRz+18I1cFU
asDv1dXzspd5lgV4cPsuRhB1NpMALIs6v82GqCnzlpjB3WBm+we3yb7xslh6+ge3
acX91BWvVk/vJcWfxicQZfYLRyQ91j2+BrcyRijN7H6F8s8RdEOzUg==
=YfCj
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index