Acpid currently only defines a handful of button input events. See the Debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521280.
I think a better solution would be, to support arbitrary events. Just listen to all events, that are defined in an event file. A special syntax would be needed. E.g.: `event=button/<type>/<code>/<value>'. So to listen to the power button, one would write `event=button/EV_KEY/KEY_POWER/1'.
Type, code and value can easily be found by `input-events'. Acpid would parse all event files, and then simply listen to all found button events. No need for users to wait until acpid supports a certain event. There would need to be a mapping from the names (e.g. EV_KEY) to their integer values. This mapping should be in a separate text file, with `name=value' entries. Acpid would parse this file on start-up. It can be generated automatically from input.h. The advantage would be, that acpid was rather independent of kernel changes.
I guess I could write a patch for acpid, if that was appreciated. But the event syntax would have to be agreed upon.
Log in to post a comment.