Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

key property

Gets the key identifier of a key that is pressed.

Document Object Model (DOM) Level 3 Events Specification, Section 5.2.6Internet Explorer 9



HRESULT value = object.get_key(* p);

Property values

Type: BSTR

A key identifier.

Standards information


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

See also

Key Identifiers



Community Additions

© 2015 Microsoft