The EvtGetEvent call returns the keyDownEvent.  Your handler should handle
the event first, before it is passed to SysHandleEvent.  Try something like
this:
while (true)
  {
      EvtGetEvent (&event, 50);
      if (!HandleKeyDown(&event))
          if (!SysHandleEvent(&event))
             FrmDispatchEvent (&event);
}

HandleKeyDown is your function to handle the keyDownEvent.  Have it return
true on any key that you do not want the system to handle.

Regards,
Steve

----- Original Message -----
From: Eric <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Tuesday, December 05, 2000 9:36 PM
Subject: Re: keydown event?


> > After your program handles the keyDownEvent, you must return false and
not
> > let the system handle it.
>
> my event loop is like that.
>  while (true)
>  {
>      EvtGetEvent (&event, 50);
>      if (!SysHandleEvent(&event))
>         FrmDispatchEvent (&event);
>  }
>
> in SysHandleEvent, it generate a keydown event and return 0 during a
keydown.
> FrmDispatchEvent (&event) let me handler the keydown event. even return 0
at
> eventhandler, SysHandleEvent cannot get this message.
>
> Eric
>
>
> >
> > ----- Original Message -----
> > From: Eric <[EMAIL PROTECTED]>
> > Newsgroups: palm-dev-forum
> > To: Palm Developer Forum <[EMAIL PROTECTED]>
> > Sent: Tuesday, December 05, 2000 8:53 PM
> > Subject: keydown event?
> >
> > >     I want to filter out some of key to insert to the field. the
method
> > > I try is when my event handler receive a keydown event, if match key
> > > found, clear the keyevent buffer. but the method fail. any work
method?
> > >
> > > Eric
> > >
> > >
> > > --
> > > For information on using the Palm Developer Forums, or to unsubscribe,
> > please see http://www.palmos.com/dev/tech/support/forums/
> > >
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


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