Capturing Keyboard Events in Adobe Flex 3

For anyone else spending an unfortunate length of time unsuccessfully attempting to capture keyboard events in a Flex 3 application (for browser or AIR), here’s where you’re probably going wrong.

You are likely registering the keyboard listener too early. It’s likely that you are calling an init() method where you register the keyboard event on creationComplete. Instead, call the init function later on. Try registering the event in the applicationComplete event handler.

More info here:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=304

You can leave a response, or trackback from your own site.
  • http://- Razvan

    Thanks for the tip! I was about to pull my hair out :)

  • Timmy

    Hi I need to capture the “Application Key” to show a context menu in my flex application.
    Please reply me for this.
    Thanks in Advance.

    Timmy K Tom
    timmyktom@gmail.com

  • Dennis

    Thanks a lot! :D

  • Roberto

    Thx a lot!!

  • http://www.jeffguthrie.com jeff

    Thanks a ton, wondering why this wouldnt work.

blog comments powered by Disqus