Idries,
I posted the same question a few weeks ago, though in a more general way.
Alex Gusev replied and gave me some code that I plugged in and it worked
great. (#2 was what was given as the answer, so I suspect that's your best
route.)
Below is the code that was given in the reply:
Regards,
Rich
---------- Previous post ---------------
Hi Richard,
try the following code:
void EventLoop(void)
{
EventType event;
Word error;
do {
EvtGetEvent(&event, evtWaitForever);
if ( !PreprocessEvent (&event) )
continue;
if (! SysHandleEvent(&event))
if (! MenuHandleEvent(0, &event, &error))
if (! ApplicationHandleEvent(&event))
FrmDispatchEvent(&event);
} while (event.eType != appStopEvent);
}
Boolean PreprocessEvent (EventPtr event)
{
if (event->eType == keyDownEvent)
{
if (event->data.keyDown.modifiers & commandKeyMask)
{
if
(TxtCharIsHardKey(event->data.keyDown.modifiers,event->data.keyDown.chr))
{
switch (event->data.keyDown.chr)
{
case vchrHard1:
case vchrHard2:
case vchrHard3:
case vchrHard4:
// Handle event here as you want to, e.g.
simly dispatch it to standard handler
FrmDispatchEvent (event);
return false;
default:
return true;
}
}
return true;
}
}
return true;
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/