UNPKG

toosoon-events

Version:

Project providing services implemented as singleton class instances

20 lines (19 loc) 689 B
import { EventsManager } from './index'; export type KeyboardEventKey = 'down' | 'up' | 'press'; export type KeyboardListener = (event: KeyboardEvent) => void; /** * Utility class for creating keyboard events listeners * * @class KeyboardManager * @extends EventsManager */ declare class KeyboardManager extends EventsManager<KeyboardEventKey, KeyboardListener> { protected listeners: Record<KeyboardEventKey, KeyboardListener[]>; protected bind(eventKey: KeyboardEventKey): void; protected unbind(eventKey: KeyboardEventKey): void; private _onKeyDown; private _onKeyUp; private _onKeyPress; } declare const _default: KeyboardManager; export default _default;