import { KeyboardDevice, KeyboardInputState } from "../../interfaces/input.d.ts"; /** * Callback type for keyboard device connection events */ export type KeyboardDeviceCallback = (device: KeyboardDevice) => void; /** * Callback type for keyboard input events */ export type KeyboardInputCallback = (device: KeyboardDevice, state: KeyboardInputState) => void; /** * Responsible for tracking keyboard state and notifying subscribers of changes. */ export declare class KeyboardInputPlugin { private _keyboardDevice; private _keysState; private _onDeviceConnected?; private _onInputChanged?; /** * Create a new KeyboardInputPlugin */ constructor(); /** * Register a callback for device connected events * * @param callback */ onDeviceConnected(callback: KeyboardDeviceCallback): void; /** * Register a callback for input changed events * * @param callback */ onInputChanged(callback: KeyboardInputCallback): void; /** * Get the current keyboard state */ getState(): KeyboardInputState; /** * Get the keyboard device */ getDevice(): KeyboardDevice; /** * Tears down the keyboard resource access and cleans up event listeners */ $teardown(): Promise; /** * Set up keyboard event listeners */ private _setupKeyboardEvents; /** * Handle keyboard key down events */ private _handleKeyDown; /** * Handle keyboard key up events */ private _handleKeyUp; /** * Notify subscribers of device connected event */ private _notifyDeviceConnected; /** * Notify subscribers of input changed event */ private _notifyInputChanged; }