metaKey Event AttributeEvent Object
Definition and Usage
The metaKey event attribute returns a Boolean value that indicates whether or not the "meta" key was pressed when an event was triggered.
The following example alerts whether or not the "meta" key was pressed when a mouse button was clicked:
alert("The meta key was pressed!")
alert("The meta key was NOT pressed!")
<p>Click somewhere in the document.
An alert box will tell you if you
pressed the meta key or not.</p>
Try it yourself »
Thank You For Helping Us!
Your message has been sent to W3Schools.