title: Handle Tab event
body: <p>How can I handle a <kbd>Tab</kbd> <code>keypress</code> event in Angular 2?</p>
  
  <p>I took this from the Angular docs to get the <code>keyCode</code>. It works well when I press the other keys, but when I press <kbd>Tab</kbd> nothing happens.</p>
  
  <pre><code>import { Component } from '@angular/core';
  
  @Component({
   selector: 'my-app',
   template: `&lt;input (keyup)="onKey($event)"&gt;
              &lt;p&gt;{{values}}&lt;/p&gt;`
  })
  
  export class AppComponent {
    values = '';
    onKey(event: any) { 
    this.values += event.keyCode+ ' | ';
    }
  }
  </code></pre>
  
  <p>Also, is this the correct way to do it in Angular 2?</p>
  
  <pre><code>&lt;input ng-keydown="($event.keyCode == 9) &amp;&amp; 
         signal('something')" /&gt;
  </code></pre>