2 Replies Latest reply on Jun 2, 2011 11:48 AM by atiaxi

    KEY_DOWN isn't being triggered after state change unless I click first.

    atiaxi

      I've got a listener for KeyboardEvent.KEY_DOWN registered in my application.  I'm used to needing to click the app in order for it to get keyboard focus the first time - but this is happening [i]every time[/i] I switch states.

       

      I made some minimal code that demonstrates the problem and put it up at http://pastebin.com/4bE7Z8gc

       

      If you run this, you'll see a button that says 'press me for state two'.  If you click anywhere else in the app and hit keys, you'll see the events fire.  Press the button to change states, however, and that all stops.  You have to click elsewhere again in order to get it to register.

       

      Is there any way around this?