Hi all!
In short: masking the primary 4 hard buttons on Tungsten C fails and default
applications (like Memo or Address Book) are launched when not supposed to.
Same code works ok on every other Tungsten we tried.
I'm doing the following:
Application_Start()
{
// mask hard buttons
UInt32 mask=~( keyBitHard1 |
keyBitHard2 |
keyBitHard3 |
keyBitHard4 |
keyBitPageUp |
keyBitPageDown |
keyBitNavLeft |
keyBitNavRight |
keyBitNavSelect);
KeySetMask(mask);
return errNone;
}
void AppStop(void)
{
// unmask hard buttons
KeySetMask(keyBitsAll);
/* Close all the open forms. */
FrmCloseAllForms();
}
Then, in the Event Handler of a form a call to:
UInt32 state=KeyCurrentState();
properly shows that hard button 1 (keyBitard1) is pressed.
And after leaving the Event Loop, our application quits and whatever application is
mapped to the respective hard button - is launched.
Also, checking for a keyDownEvent in the form event handler shows no incoming events.
Any solution or the buttons on this device cannot be mapped this way?
Best regards,
Ilia.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/