MouseEvent.altKey

Summary

The altKey property indicates if the alt key was pressed (true) or not (false) when the event occured.

Syntax

var altKeyPressed = instanceOfMouseEvent.altKey

Value

A boolean

Specifications

Specification Status Comment
Document Object Model (DOM) Level 2 Events Specification Recommendation  
Document Object Model (DOM) Level 3 Events Specification Working Draft  
UI Events Working Draft Extend DOM3
Pointer Lock Working Draft Extend the MouseEvent interface

Browser compatibility

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
movementX
movementY
(Yes) moz (Yes) webkit ? ? ?
buttons (Yes) Not supported ? ? ?
Feature Firefox Mobile (Gecko) Android IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

See also

Document Tags and Contributors

Contributors to this page: amycb, Jeremie
Last updated by: amycb,