I am trying to implement several hotkeys into an application. I want to have key combination from alt+1 till alt+9.
The alt+1 combination is working like a charm (breakpoint reached), but alt+2 is not working (breakpoint not reached).
Can someone explain that?
@HostListener('document:keydown.alt.1', ['$event'])
doThis(e: KeyboardEvent) {
// action();
e.preventDefault();
}
@HostListener('document:keydown.alt.2', ['$event'])
doThat(e: KeyboardEvent) {
// action();
e.preventDefault();
}