Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

metaKey event attribute

metaKey event attribute

Event Object Reference Event Object


Definition and Usage

The metaKey event attribute returns a boolean value indicating whether the "meta" key was pressed and held down when the event occurred.

Syntax

event.metaKey


Example

Example

The following example alerts whether the "meta" key is held down when a mouse button is clicked:

Runoob Tutorial(runoob.com)

Click somewhere in the document. An alert box will tell you whether you pressed the meta key.

Try it »


Event Object Reference Event Object