title: Catch enter key press in input text field in AS3
body: <p>I want to catch the enter key press when the user is filling an input text field in AS3.
  I think I have to do something like this:</p>
  
  <pre><code>    inputText.addEventListener(Event. ? , func);
      function func(e:Event):void{
         if(e. ? == "Enter"){
            doSomething();
         }
      }
  </code></pre>
  
  <p>But I can't find the best way to do this. 
  By the way, the input text has a restriction:</p>
  
  <pre><code>inputText.restrict = "0-9";
  </code></pre>
  
  <p>Should I add the enter key to the restrictions?</p>
  
  <pre><code>inputText.restrict = "0-9\n";
  </code></pre>
  
  <p>Thanks in advance.</p>