On Sat, Jan 07, 2006 at 08:24:44PM +0100, Henrik Brix Andersen wrote: > On Sat, Jan 07, 2006 at 05:24:46PM +0000, Matthew Garrett wrote: > > a) Hal should assume that all hardware has a sleep key, since there's no > > way to actually tell. > > Why bring Hal into this equation?
Because, over time, applications are likely to start worrying about what hal thinks in this respect. gnome-power-manager already listens for hal events related to the sleep button. > > b) Events generated in cases (1) and (2) should, for now, be caught by > > acpid (or something similar) and then fed back into the input layer via > > uinput. This should be scancode 142, which will end up as X keycode 223. > > And how would this work for users who doesn't have Hal installed? I'm sorry, I don't understand the question. This is entirely independent of hal. > Having ACPI hotkey events delivered as normal keyboard input makes it > difficult to run system scripts as root:root. But that does nothing to help systems which only expose sleep keys via the keyboard controller. It's not practical to get them to generate ACPI events - however, it /is/ practical to get ACPI events to generate input events. At that point there's nothing to stop a hotkey daemon running as root. -- Matthew Garrett | [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
