There are 2 forms and a button. How to register the event of activating the button (not only by clicking the mouse, but in any other way, for example, focus + pressing the space bar).

this.butonConfirm.addEventListener(event, function); 

    1 answer 1

    Before listening to the keys from an object, you need to set the application focus on it.

     MainDisplayObject.stage.focus = this.butonConfirm; this.butonConfirm.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);