import { InputDevice, InputState } from "../input-device"; /** * See key mappings in http://gcctech.org/csc/javascript/javascript_keycodes.htm */ export declare enum Key { ARROW_LEFT = 37, ARROW_UP = 38, ARROW_RIGHT = 39, ARROW_DOWN = 40, N0 = 48, N1 = 49, N2 = 50, N3 = 51, N4 = 52, N5 = 53, N6 = 54, N7 = 55, N8 = 56, N9 = 57, A = 65, B = 66, C = 67, D = 68, E = 69, F = 70, G = 71, H = 72, I = 73, J = 74, K = 75, L = 76, M = 77, N = 78, O = 79, P = 80, Q = 81, R = 82, S = 83, T = 84, U = 85, V = 86, W = 87, X = 88, Y = 89, Z = 90 } export declare class KeyState extends InputState { constructor(); } export declare class Keyboard extends InputDevice { private static readonly DEFAULT_KEY; private _isPaused; private readonly _keys; private readonly _states; private _holdFrameDelay; private _element; constructor(); /** * Get or Set the frame-delay of when the PRESSED event is changed into the HELD event. * Default is 5 frame delay */ get holdFrameDelay(): number; set holdFrameDelay(delay: number); /** * Checks if the provided keyboard key has been pressed/clicked * * @param key - the keyboard key to check */ isPressed(key: Key, firstOnly?: boolean): boolean; /** * Checks if the provided keyboard key has been released. This normally follows * a pressed event. * * @param key - the keyboard key to check */ isReleased(key: Key): boolean; /** * Checks if the provided keyboard key has been pressed/held down without release. * * @param key - the keyboard key to check */ isPressedDown(key: Key): boolean; /** * Returns the current state of the provided key * @param key - the key to check */ key(key: Key): KeyState; setup(element?: HTMLElement | null): void; pause(): void; resume(): void; update(): void; private static _fillKeys; private readonly _handlerDown; private readonly _handlerUp; }