Skip to content

KeyboardEvent

Generated from idl/uievents.webidl when the site was built at 7aa23e2.

KeyboardEvent is an interface in idl/uievents.webidl, inheriting UIEvent, exposed in Window. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
Keyboard events Widely available Partial 7.7% 29 of 372 subtests pass 12
constructor
constructor(DOMString type, optional KeyboardEventInit eventInitDict = {});
int32_t niso_keyboard_event_new(niso_dom* dom, const char* type, size_t type_len, const niso_keyboard_event_init* event_init_dict, niso_handle* out);
const
const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
const
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
const
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
const
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
attribute
readonly attribute DOMString key;
int32_t niso_keyboard_event_get_key(niso_dom* dom, niso_handle self, niso_str* out);
attribute
readonly attribute DOMString code;
int32_t niso_keyboard_event_get_code(niso_dom* dom, niso_handle self, niso_str* out);
attribute
readonly attribute unsigned long location;
int32_t niso_keyboard_event_get_location(niso_dom* dom, niso_handle self, uint32_t* out);
attribute
readonly attribute boolean ctrlKey;
int32_t niso_keyboard_event_get_ctrl_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean shiftKey;
int32_t niso_keyboard_event_get_shift_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean altKey;
int32_t niso_keyboard_event_get_alt_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean metaKey;
int32_t niso_keyboard_event_get_meta_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean repeat;
int32_t niso_keyboard_event_get_repeat(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean isComposing;
int32_t niso_keyboard_event_get_is_composing(niso_dom* dom, niso_handle self, bool* out);
operation
boolean getModifierState(DOMString keyArg);
int32_t niso_keyboard_event_get_modifier_state(niso_dom* dom, niso_handle self, const char* key_arg, size_t key_arg_len, bool* out);
attribute
readonly attribute unsigned long charCode;
int32_t niso_keyboard_event_get_char_code(niso_dom* dom, niso_handle self, uint32_t* out);
attribute
readonly attribute unsigned long keyCode;
int32_t niso_keyboard_event_get_key_code(niso_dom* dom, niso_handle self, uint32_t* out);