FE/Angular
[ ANGULAR ] 전역 키보드 이벤트
HEON.D
2021. 7. 30. 03:47
import { HostListener } from '@angular/core';
@HostListener('document:keypress', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {
console.log(event.key);
}