Angular Quick Tip: Binding Specific Keys to the Keyup and Keydown Events

JavaScript
<input (keydown)="onKeydown($event)">
onKeydown(event) {
  if (event.key === "Enter") {
    console.log(event);
  }
}
Source

Also in JavaScript: