English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The event.metaKey property checks if the META key is pressed when the event is triggered.
If the META key is pressed when the event is triggered, this method returns true, otherwise it returns false.
In some platforms, this key may be mapped to an alternative key name:
On the Macintosh keyboard, the META key is mapped toCommand key(⌘)
On the Windows keyboard, the META key is mapped toWindows key(Win key)
event.metaKey
Determine if the META key is pressed when the event is triggered:
$("button").click(function(event) { $("#output").text(event.metaKey); });Test and see‹/›
Parameter | Description |
---|---|
event | TheEventThe parameters come from the event binding feature |