Subject: Re: Panasonic ACPI support for special keys
To: None <>
From: Valeriy E. Ushakov <>
List: tech-kern
Date: 04/11/2005 05:34:28
On Sun, Apr 10, 2005 at 23:34:22 +0200, Quentin Garnier wrote:

> 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).

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.

> 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.

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

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.

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.


SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen