Jim,
I have noticed the duplicate 5-way navigator events coming directly from
the event queue, but haven't noticed that problem in my event handler,
which doesn't have a lot of special cases:
case keyDownEvent:
form = FrmGetActiveForm();
table = (TableType *)ctrlPtr(form, AouFormTable);
if (IsFiveWayNavEvent(event)) {
if (NavDirectionPressed(event, Right))
HandlePressRight(form, table);
else if (NavDirectionPressed(event, Left))
HandlePressLeft(form, table);
else if (NavSelectPressed(event))
HandlePressSelect(form, table);
}
switch (event->data.keyDown.chr) {
case pageUpChr:
HandlePageUp(form, table);
break;
case pageDownChr:
HandlePageDown(form, table);
break;
}
// Leave unhandled so system can handle event (and highlight table
item).
break;
- - -
This handler doesn't exhibit any duplicate 5-way navigator event
behavior on the Zire 31 and the Tungsten TE2.
By the way, I was also content with my old event handler for the 5-way
navigator but had to revisit it so it would work with the newer
devices. And I also wasn't interested in the new tab order
capabilities. Because I want the vchrRockerUp and vchrRockerDown events
mapped to pageUpChr and pageDownChr, I have not bothered with putting
the form in object interaction mode.
- Greg
Jim McGowen wrote:
>
> Glad to hear it's not just me :)
>
> "Robert Moynihan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Jim McGowen wrote:
> >
> >>Just tried it again and it DOES work... must have copied something wrong
> >>the first time, sorry bout that!
> >>
> > Yeah, I thought that it had to work.
> >
> >>Still seeing multiple key down events though. On that note, the Tungsten
> >>C always uses the first half of your if statement, the T5 always uses the
> >>else half. If there are 2 events, the first one isn't handled by your
> >>code, but the second one is, except on the Tungsten C the select key is
> >>processed twice for a single press. (that's debugging on the devices, not
> >>sims)
> >>
> > This IS a hassle. I don't remember the particulars right now, but I know
> > for sure that I have some ugly, special-case code in there so that it
> > doesn't respond to the -- inevitable as far as I can tell -- double
> > presses on some devices. I do return "true" after handling the keyDown
> > events but the repeats don't seem to stop. I see this on my T3, but my
> > T600 doesn't send those keys, IIRC.
> >
> > Bob
> >
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/