Interesting - this may again be an emulator thing (still have to try on real device.)

What I get on the emulator, is that pressing the power key for more than an instant 
toggles the back light but does not notify my
app.  But - if I HOLD the power for several seconds (as I might on a real device), 
then my app DOES get a vchrBacklight event.

So for now, I'll assume that this works on the real device and I can just hook 
vchrBacklight.

Thanks for your time!
- Jeff

DIAMOND JEFF wrote:

> Hello Palm Folks!
>
> I have not found a way to detect when the user toggles the back light
> under OS 3.1.
> Under OS 3.5, I get a vchrBacklight (or vchrContrast, etc, etc).
>
> Under OS 3.1, it seems like my app receives no events on the subject.
>
> Is this correct?  Has anyone found an indirect way to detect this?
>
> (As an example of an indirect method, the way I detect that the device
> has powered on under OS 3.1 (in lieu of vchrPowerOff and vchrLateWakeup)
> is to note when I get a vchrHardPower, and then periodically check
> KeyCurrentState() for when the power key clears.  [I could detect it
> sooner, of course, but this was more compatible with my event loop])
>
> Thanks much, OS 3.1 Gurus!
>
> (There's an odd satisfaction one gets from porting to older OS versions
> that doesn't come with porting to later OS versions...)
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


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

Reply via email to