import { IKey } from "./_types/IKey"; import { IKeyEventInput } from "./_types/IKeyEventInputs"; import { IKeyEventType } from "./_types/IKeyEventType"; import { IKeyMatcher } from "./keyIdentifiers/keys"; export declare class KeyEvent { /** The keys that were held down when this event was fired */ held: IKey[]; /** Whether the ctrl key is down */ ctrl: boolean; /** Whether the shift key is down */ shift: boolean; /** Whether the alt key is down */ alt: boolean; /** Whether the meta key is down */ meta: boolean; /** The keyboard event type */ type: IKeyEventType; /** The key that was altered */ key: IKey; /** The original event this event was obtained from if any */ original?: KeyboardEvent; /** * Creates a new keyboard event * @param event The data for the event to create * @param heldKeys The keys that are also held currently */ constructor(event: IKeyEventInput, heldKeys?: IKey[]); /** * Sets the keys that are also held while this event was created * @param keys The keys that are held, overrides the previous keys */ setHeldKeys(keys: IKey[]): void; /** * Checks whether this event is equal to the given description * @param keys The keys to check for * @param type The event type to check for, defaults to "down" */ is(keys: IKeyMatcher | IKeyMatcher[], type?: IKeyEventType | IKeyEventType[] | null): boolean; /** * Checks whether this event includes the pressed sequence (more keys may be held) * @param keys The keys to check for * @param type The event type to check for, defaults to "down" */ matches(keys: IKeyMatcher | IKeyMatcher[], type?: IKeyEventType | IKeyEventType[] | null): boolean; /** * Determines whether the held keys include all the specified key(s) * @param keys The key(s) to check * @returns Whether it is included */ includes(keys: IKeyMatcher | IKeyMatcher[]): boolean; /** * Checks whether any of the modifier keys were held */ hasModifiers(): boolean; } //# sourceMappingURL=KeyEvent.d.ts.map