KeyboardEvent
KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard.
interface KeyboardEvent extends UIEvent {
readonly altKey: boolean;
readonly charCode: number;
readonly code: string;
readonly ctrlKey: boolean;
readonly DOM_KEY_LOCATION_LEFT: number;
readonly DOM_KEY_LOCATION_NUMPAD: number;
readonly DOM_KEY_LOCATION_RIGHT: number;
readonly DOM_KEY_LOCATION_STANDARD: number;
readonly isComposing: boolean;
readonly key: string;
readonly keyCode: number;
readonly location: number;
readonly metaKey: boolean;
readonly repeat: boolean;
readonly shiftKey: boolean;
getModifierState(keyArg: string): boolean;
initKeyboardEvent(
}typeArg: string,
bubblesArg?: boolean,
cancelableArg?: boolean,
viewArg?: Window | null,
keyArg?: string,
locationArg?: number,
ctrlKey?: boolean,
altKey?: boolean,
shiftKey?: boolean,
metaKey?: boolean,
): void;var KeyboardEvent: {
prototype: KeyboardEvent;
readonly DOM_KEY_LOCATION_LEFT: number;
readonly DOM_KEY_LOCATION_NUMPAD: number;
readonly DOM_KEY_LOCATION_RIGHT: number;
readonly DOM_KEY_LOCATION_STANDARD: number;
new (type: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
};