I just wrote a small hack that allows a Palm user to use one of the 4
buttons to turn on the Palm without launching the associated app. I
need to find out when the Palm is turned off. I have code that
basically works with the normal auto off or when the user presses the
power button to turn the Palm off. But I get reports from people that
it doesn't work with some of the programs that turn the Palm off.
Here is the code that I use to detect power off.
if ( ( event->eType == keyDownEvent ) &&
( event->data.keyDown.modifiers & commandKeyMask ) &&
( ( event->data.keyDown.chr == hardPowerChr ) ||
( event->data.keyDown.chr == vchrAutoOff ) ||
( event->data.keyDown.chr == vchrPowerOff ) ||
( event->data.keyDown.chr == autoOffChr ) ) ) {
But it doesn't seem to catch the power off for LauncherIII and another
app called Off. The full source for the hack is at
http://fujima.50megs.com
Any help would be appreciated.
Dwayne Fujima
fujima at shore dot net
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/