altKey Property (event, Event Constructor)

Switch View :
ScriptFree
altKey Property

Gets a value that indicates the state of the ALT key.

Syntax

[ bAltKeyDown = ] object.altKey

Possible Values

bAltKeyDown Boolean that receives one of the following values.
false
ALT key is not pressed.
true
ALT key is pressed.

The property is read-only. 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.

Standards Information

There is no public standard that applies to this property.

Applies To

event, Event Constructor

See Also

altLeft
Community Content

Mr. Raymond Kenneth Petry
documentation question
COMPARE: ctrlKey documentation claims writeable (but breaks its event handler). 

Mr. Raymond Kenneth Petry
user applicability
From onkeydown:

1. Note that IE7/XP treats the altKey default action as superior that it does no-matter-what ... nevertheless user design override is possible:

1.1. Where Alt-Enter invokes a document Properties/Certificates popup, it can be suppressed by returning event.keyCode=0 ('no key pressed');

[Albeit note that some versions of IE7/XP use Alt-Enter to toggle Full Screen mode (effectually a Windows-command) that can't, be suppressed.]

1.2. Where Alt-arrow is unsuppressible by keyCode, returnValue, cancelBubble... it can be suppressed by the onbeforeunload handler return value.

ALTERNATE REMEDIES: Let user prepend Ctrl: Ctrl-Alt-Enter, Ctrl-Alt-arrow; And use Persistence Behavior or localStorage in case the user miskeys.