MouseEvent getModifierState() Method

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP







<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->




MouseEvent getModifierState() Method



❮ DOM Events
❮ MouseEvent




Example


Is the Caps Lock key activated?



var x = event.getModifierState("CapsLock");

Try it Yourself »


Definition and Usage


The getModifierState() method returns true if the specified modifier key was
pressed, or activated.


Modifier keys that are activated only when they are being pressed down:


  • Alt

  • AltGraph

  • Control

  • Meta

  • Shift

Modifier keys that are activated when they are clicked, and deactivated when
they are clicked again:


  • CapsLock

  • NumLock

  • ScrollLock


Browser Support


The numbers in the table specify the first browser version that fully supports the
method.














Method
getModifierState() 30 9.0 15 10.1 17




<!--
mid_content, all: [300,250][336,280][728,90][970,250][970,90][320,50][468,60]
-->




Syntax



event.getModifierState(modifierKey)


Parameter Values






Parameter Description
modifierKey The key to check if is activated or not. Legal Values:

"Alt"

"AltGraph"

"CapsLock"

"Control"

"Meta"

"NumLocK"

"ScrollLock"

"Shift"

Technical Details






Return Value:
A Boolean, true if the specified modifier key is activated, otherwise false.
DOM Version: DOM Level 3 Events

More Examples



Example


Is the shift key breing pressed down?



var x = event.getModifierState("Shift");

Try it Yourself »



Related Pages


HTML DOM reference: MouseEvent altKey Property


HTML DOM reference: MouseEvent ctrlKey Property


HTML DOM reference: MouseEvent metaKey Property




❮ DOM Events
❮ KeyboardEvent


Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế