I also use method #2.  Some key codes you will intercept may not belong to a
physical button (the OS sometimes enqueues keys to handle events) or may be
a new button on a licensee's device, its best to just let the OS handle any
buttons you're not interested in.

----- Original Message -----
From: "Idries Hamadi" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 7:02 AM
Subject: Capturing button input.


> Hi all,
>
> I want to capture the button input on the Palm. As far as I can see there
> are 2 ways to do this.
>
> 1 - Call KeySetMask to disable all key events and then call
KeyCurrentState
> every tick to get the state of the keys.
> 2 - Intercept all of the key events in the message loop before I call
> SysHandleEvent so that the system cannot process these events.
>
> Are there better ways? I prefer 2 over 1 as it's less fiddly. If I do go
> with 2, do I need to let through the power key events etc. to let the user
> turn off their palm? The CW docs seem a little thin in this area.
>
> Cheers,
> Idries
>
>  <<...>>
>
>
> --
> 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