We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


The MouseEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.

See the document of KeyboardEvent.getModifierState() for details.


var active =​ event.getModifierState(keyArg);


A Boolean


A modifier key value. The value must be one of the KeyboardEvent.key values which represent modifier keys or "Accel". This is case-sensitive.


Specification Status Comment
Document Object Model (DOM) Level 3 Events Specification
The definition of 'getModifierState()' in that specification.
Obsolete Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 47 (Yes)        
"Accel" support No support ?        
Feature Android Android Webview Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile Chrome for Android
Basic support No support 47 (Yes)         47
"Accel" support No support 47 ?         47

See also

Document Tags and Contributors

 Contributors to this page: libbymc, jpmedley, teoli, Masayuki
 Last updated by: libbymc,