forked from jquery/api.jquery.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.metaKey.xml
34 lines (34 loc) · 1.03 KB
/
event.metaKey.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0"?>
<entry type="property" name="event.metaKey" return="Boolean">
<title>event.metaKey</title>
<signature>
<added>1.0.4</added>
</signature>
<desc>Indicates whether the META key was pressed when the event fired.</desc>
<longdesc>
<p>Returns a boolean value (<code>true</code> or <code>false</code>) that indicates whether or not the <kbd>META</kbd> key was pressed at the time the event fired.
This key might map to an alternative key name on some platforms.</p>
</longdesc>
<example>
<desc>Determine whether the META key was pressed when the event fired.</desc>
<css><![CDATA[
body {
background-color: #eef;
}
div {
padding: 20px;
}
]]></css>
<html><![CDATA[
<button value="Test" name="Test" id="checkMetaKey">Click me!</button>
<div id="display"></div>
]]></html>
<code><![CDATA[
$( "#checkMetaKey" ).click(function( event ) {
$( "#display" ).text( event.metaKey );
});
]]></code>
</example>
<category slug="events/event-object"/>
<category slug="version/1.0.4"/>
</entry>