HAL, and laptop Fn and hardware keys

Richard Hughes hughsient at gmail.com
Wed Sep 21 02:37:22 PDT 2005


On Tue, 2005-09-20 at 12:41 -0400, David Zeuthen wrote:
> On Tue, 2005-09-20 at 16:28 +0100, Richard Hughes wrote:
> > The extra key presses (e.g. Fn-F1, and other h/w buttons) on most
> > laptops are very vendor specific (Just like acpi brightness support) and
> > have lots of different hacky scripts and daemons to watch each of the
> > wacky interfaces. Sony has watched sonpid, and toshiba currently has
> > fnfxd. I'm sure the other laptop makes have their own scripts too.
> 
> Yes, but you have to keep in mind that prior to HAL there was no place
> this could be abstracted in a sane way - see below...
> 
> > 
> > What is the consensus of an addon, say hal-addon-<vendor>-buttons that
> > reports each of these events as a dbus signal, so that gnome control
> > center (or another more suitable gnome process) can do a specific
> > action?
> 
> I feel we already designed the 'button' capability with this in mind. We
> simply emit the ButtonPressed device condition on the appropriate hal
> device object. The only thing you need is to set button.type to some
> value we need to decide upon. What these values are require some
> thought, I envision that the possible values should be chosen such that
> e.g. Sony, Toshiba and whatever specific bits can share the values. 

Yes, sounds good.

button.type = bluetooth_power, wifi_power, FnF1

> That way we can achieve abstraction and, equally important, laptop
> vendors can send patches to HAL to get support and things will just work
> if they choose the appropriate button.type values.

:-)

> > The addon can be launched in the existing infrastructure just checking
> > for the existance of files/directories, e.g. /proc/acpi/toshiba/buttons
> > and would have *very low* overhead as most of the time it would be
> > sleeping.
> 
> I think we should just hack the hald/linux2/acpi.c and
> hald/linux2/addons/addon-acpi.c to support the vendor extensions.

Sure, I'll have a play with this this weekend. 

Richard.



More information about the hal mailing list