The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
altKey property
Gets a value that indicates whether the Alt key is pressed.
![]() ![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Boolean
Standards information
- Document Object Model (DOM) Level 3 Events Specification, Section 5.2.2
Remarks
To determine whether the left or right version of the Alt key is pressed, use the location property.
See also
- DragEvent
- event
- KeyboardEvent
- MouseEvent
- MouseWheelEvent
- WheelEvent
- Reference
- ctrlKey
- getModifierState
- metaKey
- shiftKey
Show:

