Subject: Re: Panasonic ACPI support for special keys
To: None <tech-kern@netbsd.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 04/11/2005 09:04:57
--gw4vLALk08fVJy3V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Apr 11, 2005 at 05:34:28AM +0400, Valeriy E. Ushakov wrote:
> On Sun, Apr 10, 2005 at 23:34:22 +0200, Quentin Garnier wrote:
>=20
> > I've done more or less the same thing for my ASUS laptop on Saturday,
> > but with a different interface. For the hot keys themselves, actually
> > those that generate only one kind of Notify, I attached a wskbd(4)
> > device so it gets muxed with any other keyboard, and then you get the
> > result as a "normal" keys (the hard part was figuring out what raw
> > scancode I should give to X--I'm still rather unsure about that part).
>=20
> What does various "internet" ps/2 keyboards generate? Accordign to
> programs/xkbcomp/keycodes/xfree86 they use some random scan codes in
> the upper half of the range, so I'd say use those too.
For I'm generating something "in that range". I could get xbindkeys to
use them, but I don't get a keysym assigned, so I'm still wondering how
I could use it in, say, ion's configuration file. I'll see if I can
find an "Internet" keyboard at work and copy that.
> > As for the brightness control, I have no idea what kind of user
> > interface we should use. Linux and FreeBSD both have that rather
> > annoying habit of creating new sysctl nodes (or /proc/sys entries) for
> > everything and its mother, resulting in a very inconsistent interface
> > for usually very similar things.
>=20
> We have an infrastructure in place already: WSDISPLAYIO_GETPARAM and
> _SETPARAM ioctls, and we already have WSDISPLAYIO_PARAM_BACKLIGHT,
> _BRIGHTNESS, and _ CONTRAST defined. wskbd automagically does
> meaningful things with them using KS_Cmd_BrightnessUp &co - one just
> need to bind these keysyms somewhere. For 3.0 I have added support
> for them to wsconsctl. H/PC ports use them, check relevant video
> drivers.
>=20
> Now, the problem is that those ioctls come through the wsdisplay
> driver, so they should be supported by the ioctl method of whatever
> device wsdisplay attaches to - i.e. vga(4) in this case - but the LCD
> driver will be a separate device.
>=20
> You can use config_hook(9) to glue them, e.g. see how hd64461video and
> j6x0lcd drivers do that. I don't remember which hpcmips driver I
> stole that code from, but few more examples should be easy to find.
Oh, that seems to be what I'm looking for. And that will probably solve
some others issues I have with other stuff. Thanks a lot for that.
Too bad there is no actual config_hook(9) man page...
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.
--gw4vLALk08fVJy3V
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQlohmdgoQloHrPnoAQLmEgf+OYcaJhWYabF69k/+BtPI3AMpCDCw9MNh
20GikJSvYTC9Vl78WH7A4ji88tGd1K7zbKv1xFVNlJp/AyiflfXdDN9demXbLLkD
ArBVgPXlVpfjtygF+X/fij+ya7dwyZYMEGHWfWf8Hya7kR10HSM4hoWbM8uey/OX
/lx/fbd7xGWlYqw8i/8jpZhUZjmPXmlhGQGx+5nIT2gMmbxL3G+DKGmW3ex/2qn/
vXMAqD+xLafNrEu/oB3imASXNvt+0sivuF10FW7DIjKwukkJ3/Ve4V1UiSDJp2hf
Nft/zrrnlkFTa3Zo/HGjnpwB9SwiTps+ZGXd2GzCKJ2uFE7xNnmscw==
=jtnK
-----END PGP SIGNATURE-----
--gw4vLALk08fVJy3V--