View Full Version : power key press event
b0unc3
04-18-2010, 11:22 AM
Hi,
is there any way to catch the press event of the powerkey?
I tried both with dbus and hal, but I didn't find anything useful.
Any hint?
danielwilms
04-19-2010, 03:34 AM
Hi,
powerlock (http://repository.maemo.org/extras-devel/pool/fremantle/free/source/p/powerlock/) uses HAL as far as I know. Maybe you could check that out.
Daniel
b0unc3
04-19-2010, 07:04 PM
Hi,
powerlock (http://repository.maemo.org/extras-devel/pool/fremantle/free/source/p/powerlock/) uses HAL as far as I know. Maybe you could check that out.
Daniel
Yes, right but I was looking in the wrong way. I needed to simply add a call to libhal_ctx_set_device_condition() and all works as expected.
Thanks for your help!
thomasjfox
01-27-2011, 04:20 AM
Yes, right but I was looking in the wrong way. I needed to simply add a call to libhal_ctx_set_device_condition() and all works as expected.
Thanks for your help!
Just a quick note: libhal_ctx_set_device_condition() won't fire the callback until you have a libhal_device_add_property_watch().
This is by libhal's design as it will only add a dbus watch rule if add a property watch even if you are only interested in the "conditions".
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.