This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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 or Tab
  • Unicode codepoint: “U+” followed by a hexadecimal character index

Syntax

Standards information

Attributions