I have following html code, I need to identify whether the event is mouse click event or keyboard enter key event.
Html code
<button mat-raised-button class="btn-enter-troubleshooting-attempts"
(click)="triggerLog($event)"> Click/Enter </button>
Type script
triggerLog(e): void {
console.log('Log Attempt', e);
//do some function based on the event
}