license import { DOCUMENT } from '@angular/common' ; import { Inject , Injectable , NgZone } from '@angular/core' ; import { Observable , Subject } from 'rxjs' ; import { ThyEventDispatcher } from './event-dispatcher' ; const DEFAULT_KEYDOWN_TIME = 100 ; @ Injectable ( { providedIn : 'root' } ) export class ThyKeyboardDispatcher extends ThyEventDispatcher { constructor ( @ Inject ( DOCUMENT ) document , ngZone ) { super ( document , ngZone , 'keydown' ) ; } keydown ( auditTimeInMs = DEFAULT_KEYDOWN_TIME ) { return this . subscribe ( auditTimeInMs ) ; } }