key
Property of dom/KeyboardEventdom/KeyboardEvent
Syntax
var result = element.key;
element.key = value;
Notes
Remarks
Key identifiers are strings that uniquely identify keyboard buttons, such as Q
, Home
, or F2
. The string can be any of the following types:
- Character string: A single character, such as a letter or symbol
- Key name: A multicharacter string such as
Enter
orTab
- Unicode codepoint: “U+” followed by a hexadecimal character index
Syntax
Standards information
- Document Object Model (DOM) Level 3 Events Specification, Section 5.2.6
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]