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

IDOMKeyboardEvent interface

Provides properties and methods for keystroke events.

Members

The IDOMKeyboardEvent interface inherits from the IDispatch interface. IDOMKeyboardEvent also has these types of members:

Methods

The IDOMKeyboardEvent interface has these methods.

MethodDescription
getModifierState

Queries the state of the specified modifier key.

initKeyboardEvent

Initializes a new keyboard event that the IDocumentEvent::createEvent method created.

 

Properties

The IDOMKeyboardEvent interface has these properties.

PropertyDescription

altKey

Gets a value that indicates whether the Alt key is pressed.

char

Gets a character for a key that is pressed, if available.

charCode

Gets the numeric key code of a key that is pressed.

ctrlKey

Gets a value that indicates whether the Ctrl key is pressed.

key

Gets the key identifier of a key that is pressed.

keyCode

Gets the numeric key code of a key that is pressed.

locale

Gets the locale name for the event.

location

Gets the location of a key on the keyboard or device.

metaKey

Gets a value that indicates whether the Meta/Control key is pressed.

repeat

Gets a value that indicates whether a key was pressed and held.

shiftKey

Gets a value that indicates whether the Shift key is pressed.

which

Gets the numeric code of a key that is pressed.

 

Requirements

Minimum supported client

Windows Vista with SP1, Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch

 

 

Community Additions

ADD
Show:
© 2015 Microsoft