Robert,

Hard button code as promised.

Regards,
Ray

========= cut here
/*****************************************************************************
 * HardButtons Event Handler (Intercept from system!)                        *
 *****************************************************************************/

// call this routine from your EventLoop immediately after EvtGetEvent
static Boolean HandleHardButtonsEvent(EventPtr event)
{
Boolean handled = false;
    if (event->eType == keyDownEvent)
    {
        switch (event->data.keyDown.chr)
        {
        case hard1Chr:
            RecordTime(1);              // record the time
            handled = true;
            break;
        case hard2Chr:
            // do nothing, but trap the button to stop the app being closed
            handled = true;
            break;
        case hard3Chr:
            // do nothing, but trap the button to stop the app being closed
            handled = true;
            break;
        case hard4Chr:
            // do nothing, but trap the button to stop the app being closed
            handled = true;
            break;
        }
    }
    return handled;
}

========= end cut

Robert Baglin wrote:

> Does anyone have information on using the hard buttons on the bottom of the
> pilot to control the input of a program, ie pressing the buttons to
> increment a counter.
> I am trying to disable the default application launching when any of the
> hard buttons are pressed, but I'm having a hard time finding the
> information needed for the code.
> Any  suggestions?
>
> Thanks
> Robert Baglin
>
> -- -- -- -- -- -- -- -- --
> Robert Baglin
> Southern Cross University
> P.O. Box 157
> Lismore
> 2480
> ph  +61 2 6620 3658
> fax +61 2 6620 3880
> -- -- -- -- -- -- -- -- --

Reply via email to