import KeyboardListener from "./keyboardListener"; import { registerKeyboard } from "./type"; class Keyboard extends KeyboardListener { constructor(options: registerKeyboard) { super(options); } add(compositionKeys: string, eventName: string, callback: () => any, element?: HTMLElement, isAutoFocusEl?: boolean): KeyboardListener { return this.addKeyboardListener(compositionKeys, eventName, callback, element, isAutoFocusEl); } register( eventName: string, callback: () => any, element?: HTMLElement, isAutoFocusEl?: boolean ): KeyboardListener { return this.registerKeyboardListener(eventName, callback, element, isAutoFocusEl); } remove(eventName: string | any[], compositionKeys?: string): KeyboardListener { return this.removeKeyboardListener(eventName, compositionKeys); } reset(to: string, from: string, eventName: string,): KeyboardListener { return this.resetKeyboardListener(to, from, eventName,); } } export default Keyboard;