Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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;
}
;

§Extends

§Properties

§
readonly altKey: boolean
[src]
§
readonly charCode: number
[src]
§
readonly code: string
[src]
§
readonly ctrlKey: boolean
[src]
§
readonly DOM_KEY_LOCATION_LEFT: number
[src]
§
readonly DOM_KEY_LOCATION_NUMPAD: number
[src]
§
readonly DOM_KEY_LOCATION_RIGHT: number
[src]
§
readonly DOM_KEY_LOCATION_STANDARD: number
[src]
§
readonly isComposing: boolean
[src]
§
readonly key: string
[src]
§
readonly keyCode: number
[src]
§
readonly location: number
[src]
§
readonly metaKey: boolean
[src]
§
readonly repeat: boolean
[src]
§
readonly shiftKey: boolean
[src]

§Methods

§
getModifierState(keyArg: string): boolean
[src]
§
initKeyboardEvent(
typeArg: string,
bubblesArg?: boolean,
cancelableArg?: boolean,
viewArg?: Window | null,
keyArg?: string,
locationArg?: number,
ctrlKey?: boolean,
altKey?: boolean,
shiftKey?: boolean,
metaKey?: boolean,
): void
[src]