From owner-acpi-jp@jp.FreeBSD.org Wed Mar 31 06:06:21 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i2UL6L628372;
	Wed, 31 Mar 2004 06:06:21 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from root.org (root.org [67.118.192.226])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with SMTP/inet id i2UL6Kd28367
	for <acpi-jp@jp.FreeBSD.org>; Wed, 31 Mar 2004 06:06:20 +0900 (JST)
	(envelope-from nate@root.org)
Received: (qmail 82832 invoked by uid 1000); 30 Mar 2004 21:06:15 -0000
From: Nate Lawson <nate@root.org>
To: OGAWA Takaya <t-ogawa@triaez.kaisei.org>
cc: acpi-jp@jp.FreeBSD.org
In-Reply-To: <86oeqixi4y.wl.t-ogawa@triaez.kaisei.org>
Message-ID: <20040330125842.U82732@root.org>
References: <86oeqixi4y.wl.t-ogawa@triaez.kaisei.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Tue, 30 Mar 2004 13:06:15 -0800
X-Sequence: acpi-jp 3168
Subject: [acpi-jp 3168] Re: acpi_panasonic: ACPI hotkey driver for Panasonic
 laptops
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: nate@root.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040307

On Sun, 28 Mar 2004, OGAWA Takaya wrote:
> I have managed to hack up a driver to utilize hotkeys on recent
> Panasonic laptops.
>
> <http://triaez.kaisei.org/~t-ogawa/misc/acpi_panasonic-20040328.tar.gz>
>
> I tested it on CF-R1N but it may work on other models as well.
> On this laptop there are 9 hotkeys:
>   Fn+F1, Fn+F2: Make LCD backlight darker/brighter
>   Fn+F3: Switch video output between LCD/CRT
>   Fn+F4: Toggle speaker silence
>   Fn+F5, Fn+F6: Mixer volume down/up
>   Fn+F7: Suspend to RAM
>   Fn+F9: Show battery status
>   Fn+F10: Suspend to disk

I took a quick glance at the code and it looks good.  Care to submit a man
page also?

We need to figure out a good way to handle hotkeys in a more generic way
than creating an rc.d script for each laptop.  It probably makes sense to
implement a /etc/rc.d/hotkey script (see power_profile for an example) and
have a /etc/rc.conf option that selects the event model (Panasonic, ASUS,
etc.)  Actually, a better way is to implement a hotkey driver that
attaches to the hardware-specific drivers and provides standard sysctls
and events (EVENT_VOLUME_UP, etc.)

Unfortunately I am a bit too busy to do this at the moment.

> All these keys except Fn+F3 are supported within the driver via
> devctl(4) and devd(8).  A sample devd entry and its corresponding
> scripts are also included.

It appears that Fn+F3 could be handled by acpi_video.  Does that work for
you?  I cannot test this since I do not have any Panasonic laptops.

Thanks,
Nate
