import { ModifierKeys, type Key } from '../Types/Key'; import { ControllerBase, type ControllerHost } from './Abstracts/ControllerBase'; /** * @private */ interface IKeyboardInputEntry { execute: (event?: KeyboardEvent) => void; canExecute: (event?: KeyboardEvent) => boolean; options?: { preventDefault?: boolean; }; } /** * The config options for a KeyboardController. * * @public */ export interface IKeyboardControllerConfig { capture?: boolean; entries?: ReadonlyArray | null; } /** * @public */ export declare class KeyboardController extends ControllerBase { private readonly _bindings; private readonly _capture; private _keydownSubscription; /** * Constructs a new instance of the `KeyEventHandler` class. * * @public */ constructor(host: ControllerHost & Element, config?: IKeyboardControllerConfig); /** * @public * @override */ hostConnected(): void; /** * @public * @override */ hostDisconnected(): void; /** * Adds a new key definition. * * @public */ add(key: Key | ModifierKeys | Array, execute: (event?: KeyboardEvent) => void, canExecute?: (event?: KeyboardEvent) => boolean, options?: { preventDefault: boolean; }): this; /** * Removes a existing key definition. * * @public */ remove(key: Key | ModifierKeys | Array): this; /** * Clears all existing key definition. * * @public */ clear(): this; /** * Merges a give key definition with another. * * @public */ merge(key: Key | ModifierKeys | Array, execute: (event?: KeyboardEvent) => void, canExecute?: (event?: KeyboardEvent) => boolean, options?: { preventDefault: boolean; }): this; /** * Handles a key definition. * * @public */ handle(event: KeyboardEvent): boolean; /** * Disposes all key definitions. * * @public */ dispose(): void; /** * @private */ private extractModifierKeys; /** * @private */ private onKeyDown; } export {}; //# sourceMappingURL=KeyboardController.d.ts.map