You should avoid using setTimeOut because it will cause your Accordion not to be garbage collected. If you must use it, use clearTimeOut in the keyDownDeferred handler. You may also want to consider using callLater instead.
What is the issue with completely overriding the Accordion's keyDown handler? Does it contain references to private variables/methods? If not, why not simply duplicate its code and remove the stopPropogation() code? Otherwise, you might want to consider that stopPropogation allows other handlers in the Accordion to handle the event as well--you could add a second handler that runs after the default keyDown handler and redispatches the event.
Yep, the Accordion keyDownhandler has various private function calls in it.
In regards to redispatching an event, how would I do that but not have the keyHandlers pick up the new event and get caught in an infinite loop?
Finally, do you really need to clearTimeout? Shouldn't that happen automatically, since setTimeout only runs once anyway?
I would use a capture phase handler instead of bubble phase.
I actually tried that - up in my main class's applicationComplete handler, I add the two listeners:
When I changed useCapture, neither the global listener or the accordion received the event.
Edit: Huh, it looks like its working today...
I would only expect that if nothing had focus. You do still need a target
phase handler on the stage if nothing can have focus in your app, although
it is best to try to always make sure something had focus.
I would add both, and ignore bubble phase events so you don't process twice:
if (event.eventPhase == EventPhase.BUBBLE) return;
(Just a note to anyone else who sees this in the future - it's EventPhase.BUBBLING_PHASE instead of EventPhase.BUBBLE)