This code will disable all the keys other than the menu and home. 

Enjoy.....
Ralph Krausse

****************************************************************

static void AppEventLoop(void)
{
        Word error;
        EventType event;


        do {
                EvtGetEvent(&event, evtWaitForever);
                // close application when battery is low

                if (event.data.keyDown.chr == calcChr)
                        continue;

                if (event.data.keyDown.chr == findChr)
                        continue;
        
                if (event.data.keyDown.chr == vchrHard1)
                        continue;
        
                if (event.data.keyDown.chr == vchrHard2)
                        continue;
        
                if (event.data.keyDown.chr == vchrHard3)
                        continue;
        
                if (event.data.keyDown.chr == vchrHard4)
                        continue;

                if (! SysHandleEvent(&event))
                        if (! MenuHandleEvent(0, &event, &error))
                                if (! AppHandleEvent(&event))
                                        FrmDispatchEvent(&event);

        } while (event.eType != appStopEvent);
}

-- 
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