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