title: Angular 2 HostListener keypress detect escape key?
body: <p>I am using the following method to detect keypresses on a page. My plan is to detect when the Escape key is pressed and run a method if so. For the moment I am just attempting to log which key is pressed. However the Escape key is never detected. </p>
  
  <pre><code>@HostListener('document:keypress', ['$event'])
  handleKeyboardEvent(event: KeyboardEvent) {
    console.log(event);
    let x = event.keyCode;
    if (x === 27) {
        console.log('Escape!');
    }
  }
  </code></pre>