Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

MouseEvent.getModifierState()

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!

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.

Syntax

var active =​ event.getModifierState(keyArg);

Returns 

A Boolean

Parameters

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

Specifications

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

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 47        
"Accel" support Not supported        
Feature Android Android Webview Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile Chrome for Android
Basic support Not supported 47         47
"Accel" support Not supported 47         47

See also

ドキュメントのタグと貢献者

 このページの貢献者: jpmedley, teoli, Masayuki
 最終更新者: jpmedley,