ctrlKey Property (event, Event Constructor)

Switch View :
ScriptFree
ctrlKey Property

Gets or sets the state of the CTRL key.

Syntax

[ bEvent = ] object.ctrlKey

Possible Values

bEvent Boolean that specifies or receives one of the following values.
false
CTRL key is not pressed.
true
CTRL key is pressed.

The property is read/write. The property has no default value.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are supported in IE7 Standards mode and IE5 (Quirks) mode only. For more information, see About Dynamic Properties and Defining Document Compatibility.

Remarks

The property is read-only in Microsoft Internet Explorer 4.0, and read/write in Internet Explorer 5 and later.

Standards Information

There is no public standard that applies to this property.

Applies To

event, Event Constructor

See Also

ctrlLeft
Community Content

Mr. Raymond Kenneth Petry
CAUTION - breaks event handler

N.B. Setting the value of this property inside an event handler, breaks the handler.

e.g. onkeydown="window.event.ctrlKey=true;

--fails at that point.

COMPARE: altKey and shiftKey documentations claim not writeable.