You need to look for the commandKeyMask at the same time.  Also make sure
you intercept the power key event before you allow the OS to handle it.  If
you're looking for the power key event in your form's event loop, you'll
never get it because the OS handles it.  Look for it before you pass the
message to SysHandleEvent.  Take a look at the Text Manager routines in the
SDK docs.

Make sure you allow the OS to process the event when you're done.  You don't
want to unnecessarily drain the unit's power.

----- Original Message -----
From: "apple k" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, March 27, 2003 4:29 AM
Subject: No any response when using hardPowerChr?


> Hi,
>
> I have to use the keydownevent to do sth after
> detecting the hardware power button? However, it
> doesn't give me any response but i've tried
> pageDownChr or pageUpChr, it is detected.
>
> the code:
>
>   case keyDownEvent:
>      if (eventP->data.keyDown.chr == hardPowerChr){
> FrmCustomAlert(InfoAlert, "1", "","");
> handled = true;
>      }
>      break;
>
> pls help. Any advices are very appreciated.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to