stage.focus = this; addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); function onKeyDown(event:KeyboardEvent):void { if (event.keyCode==13) { trace("Has presionado intro."); } }