From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 24 22:13:48 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE48916A568 for ; Sat, 24 Jul 2004 22:13:48 +0000 (GMT) Received: from gateway.nixsys.be (gateway.nixsys.be [195.144.77.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EBA143D2F for ; Sat, 24 Jul 2004 22:13:48 +0000 (GMT) (envelope-from philip@paeps.cx) Received: from erda.home.paeps.cx (erda.home.paeps.cx [IPv6:2001:838:37f:10::1]) by gateway.nixsys.be (Postfix) with ESMTP id 0EDF558 for ; Sun, 25 Jul 2004 00:13:46 +0200 (CEST) Received: from fasolt.home.paeps.cx (fasolt.home.paeps.cx [10.0.0.2]) by erda.home.paeps.cx (Postfix) with ESMTP id 569762149 for ; Sun, 25 Jul 2004 00:13:40 +0200 (CEST) Received: from fasolt.home.paeps.cx (philip@localhost [127.0.0.1]) by fasolt.home.paeps.cx (8.12.11/8.12.11) with ESMTP id i6OMDjKE086674 for ; Sun, 25 Jul 2004 00:13:45 +0200 (CEST) (envelope-from philip@fasolt.home.paeps.cx) Received: (from philip@localhost) by fasolt.home.paeps.cx (8.12.11/8.12.11/Submit) id i6OMDiN0086673 for acpi@FreeBSD.org; Sun, 25 Jul 2004 00:13:44 +0200 (CEST) (envelope-from philip) Date: Sun, 25 Jul 2004 00:13:44 +0200 From: Philip Paeps To: acpi@FreeBSD.org Message-ID: <20040724221344.GE85709@fasolt.home.paeps.cx> Mail-Followup-To: acpi@FreeBSD.org References: <20040712.200815.74734634.nyan@jp.FreeBSD.org> <86llhpz354.wl.t-ogawa@triaez.kaisei.org> <20040713.011631.74707278.nyan@jp.FreeBSD.org> <20040717.183512.74706779.nyan@jp.FreeBSD.org> <86hds6njph.wl.t-ogawa@triaez.kaisei.org> <40FE9BEA.7060802@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40FE9BEA.7060802@root.org> X-Date-in-Rome: ante diem IX Kalendas Augustas MMDCCLVII ab Urbe Condida X-PGP-Fingerprint: FA74 3C27 91A6 79D5 F6D3 FC53 BF4B D0E6 049D B879 X-Message-Flag: Get a proper mailclient! User-Agent: Mutt/1.5.6i Subject: Generic hotkey script (was: Re: Panasonic acpi driver) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2004 22:13:48 -0000 On 2004-07-21 09:38:02 (-0700), Nate Lawson wrote: > I don't want us to import any device-specific hotkey scripts (i.e., asus, > panasonic, toshiba, etc.) but instead have a single general-purpose script > and have the kernel translate device-specific tables of hotkey values to > generic ones. That way a single script can look for the generic "volume > up/down" buttons and act accordingly. > > Please email me if you're interested in working on that. I've been thinking about this a while ago, but it somehow got itself stuck on my 'maybe later' stack. My idea was to have devd do the magic here. Agree on some constants (ACPI_VOLUME_UP, ACPI_VOLUME_MUTE, ACPI_HOTKEY_1,...) that the specific drivers could send to devd using acpi_UserNotify(). We could then have a devd script (much like we also have power_profile, or we could rename that to 'acpi_event' or something similar) to catch these events. notify 10 { match "system" "ACPI"; match "subsystem" "HOTKEY"; action "/etc/rc.d/acpi_event $notify"; }; To avoid having a notify section for every different device specific acpi driver, we could either have them all be ACPI_MODULE_NAME("HOTKEY"), or we could register them under an umbrella hotkey driver. The latter approach might be nicer. Then we could also add other non-acpi hotkey gadgets (ir remote controls maybe? :-)) under it? I'd be interested in hacking at this. - Philip -- Philip Paeps Please don't CC me, I am subscribed to the list. He who dies with the most toys wins.