import { Vec2D } from '../../Math'; declare class Input { private state; private pressed; private released; /** * Screen-space mouse position */ readonly mouse: Vec2D; /** * Unregister all input handlers */ unregisterHandlers: () => void; /** * The main input handler. */ constructor(canvas: HTMLCanvasElement); /** * Continuously read user input. * * @param canvas Target canvas element */ private poll; /** * Get the state of an input. * Alphanumeric keys range from a - z, 0 - 9. * Mouse buttons range from Mouse0 - Mouse2. * * @param key Target input to be tested * @param ignoreCase Ignore the capitalization of the key * @return Is the input pressed or released? */ getState(key: string, ignoreCase?: boolean): boolean; /** * Check if input is pressed on the current frame. * Alphanumeric keys range from a - z, 0 - 9. * Mouse buttons range from Mouse0 - Mouse2. * * @param key Target input to be tested * @param ignoreCase Ignore the capitalization of the key * @return Is the input pressed this frame? */ getPressed(key: string, ignoreCase?: boolean): boolean; /** * Check if input is released on the current frame. * Alphanumeric keys range from a - z, 0 - 9. * Mouse buttons range from Mouse0 - Mouse2. * * @param key Target input to be tested * @param ignoreCase Ignore the capitalization of the key * @return Is the input released this frame? */ getReleased(key: string, ignoreCase?: boolean): boolean; /** * Reset the pressed and released values. */ refresh(): void; } export { Input };