Skip to main content
Camussx
Inspiring
September 23, 2009
Question

More explanation about Keyboard Events

  • September 23, 2009
  • 1 reply
  • 465 views

Someone can help me giving me more explanation about how to use Keyboard events inside a textFlow...

Or maybe show me some example, I try to do something like detect which key is pressed in textFlow.

I read about: keyDownHandler and manageTabKey, but I still without a clear idea...

Can you give me a hand please...?

This topic has been closed for replies.

1 reply

Adobe Employee
September 24, 2009

To filter the keys I'd suggest subclassing ContainerController and overriding keyDownHandler.

Another approach would be to add your own listeners to the containers and call preventDefault to cancel the event.

manageTabKey lets you tell TLF to treat a TAB as an insert of a TAB character and to call preventDefault.  Unfortunately that doesn't always prevent the browser from also handling TAB.  Not a problem in an AIR App though.

Hope that helps,

rRichard