Angular: How to Listen for Key Presses in the Component Class Using @HostListener Sometimes, you need to eavesdrop.