Generic hotkey script (was: Re: Panasonic acpi driver)

Philip Paeps philip at FreeBSD.org
Sat Jul 24 15:13:48 PDT 2004


On 2004-07-21 09:38:02 (-0700), Nate Lawson <nate at root.org> 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.


More information about the freebsd-acpi mailing list