I have used (keydown) event in angular 6 to bind key inputs
So on enter of 'Tab' and 'Enter' key i have to do my functionality and added a event.prevent default
But when Shift + Tab is entered it is also preventing the event
.html
<input type="text" [(ngModel)]="Result1 (keydown)="onKeydownMain($event)" >
I dont want (keydown.shift.tab) event seperate..
.ts
public onKeydownMain(event): void {
if (event.key === "Enter" || event.key === "Tab") {
event.preventDefault();
// My Functionality goes here
}
}
But the problem is when Shift + Tab is pressed , event is fired and functionality goes on, which i don't want.
How can i go this
I just want Shift + Tab to perform its default functionality on this input.