import { OWHotkeys } from './ow-hotkeys' ; import { OnPressedEvent } from './ow-types' ; export interface OWHotkeysListenerDelegate { onPressed ( event ) : void ; } export class OWHotkeysListener { constructor ( private readonly delegate ) { } public start ( ) { OWHotkeys . onPressed . addListener ( this . onPressed ) ; } public stop ( ) { OWHotkeys . onPressed . removeListener ( this . onPressed ) ; } private onPressed = ( event ) : void => { this . delegate . onPressed ( event ) ; } ; }