diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/mouseevent/ctrlkey | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/api/mouseevent/ctrlkey')
-rw-r--r-- | files/ja/web/api/mouseevent/ctrlkey/index.html | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/files/ja/web/api/mouseevent/ctrlkey/index.html b/files/ja/web/api/mouseevent/ctrlkey/index.html new file mode 100644 index 0000000000..d37884a858 --- /dev/null +++ b/files/ja/web/api/mouseevent/ctrlkey/index.html @@ -0,0 +1,125 @@ +--- +title: MouseEvent.ctrlKey +slug: Web/API/MouseEvent/ctrlKey +translation_of: Web/API/MouseEvent/ctrlKey +--- +<p>{{APIRef("DOM Events")}}</p> + +<p>読み取り専用プロパティ <strong><code>MouseEvent.ctrlKey</code></strong> は、イベント発生時に <kbd>control</kbd> キーが押されたかどうかを、押されていた (<code>true</code>) または押されていない (<code>false</code>) の{{jsxref("Boolean")}} で返します。</p> + +<h2 id="構文">構文</h2> + +<pre class="syntaxbox">var <em>ctrlKeyPressed</em> = <em>instanceOfMouseEvent</em>.ctrlKey +</pre> + +<h3 id="戻り値">戻り値</h3> + +<p>A boolean</p> + +<h2 id="Example" name="Example">例</h2> + +<pre class="brush: js"><html> +<head> +<title>ctrlKey使用例</title> + +<script type="text/javascript"> + +function showChar(e){ + alert( + "Key Pressed: " + String.fromCharCode(e.charCode) + "\n" + + "charCode: " + e.charCode + "\n" + + "CTRL key pressed: " + e.ctrlKey + "\n" + ); +} + +</script> +</head> + +<body onkeypress="showChar(event);"> +<p>何か文字キーを単体またはCTRLキーと同時に押してください。<br /> +また、CTRLキーに加え、SHIFTキーも同時に使用できます。</p> +</body> +</html> +</pre> + +<h2 id="仕様">仕様</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('DOM3 Events','#widl-MouseEvent-ctrlKey','MouseEvent.ctrlKey')}}</td> + <td>{{Spec2('DOM3 Events')}}</td> + <td>{{SpecName('DOM2 Events')}}から変更なし</td> + </tr> + <tr> + <td>{{SpecName('DOM2 Events','#Events-MouseEvent','MouseEvent.ctrlKey')}}</td> + <td>{{Spec2('DOM2 Events')}}</td> + <td>最初期の定義</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ互換性</h2> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>機能</th> + <th>Edge</th> + <th>Firefox (Gecko)</th> + <th>Chrome</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>基本サポート</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown()}}</td> + <td>{{CompatVersionUnknown()}}</td> + <td>{{CompatVersionUnknown()}}</td> + <td>{{CompatVersionUnknown()}}</td> + <td>{{CompatVersionUnknown()}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>機能</th> + <th>Edge</th> + <th>Firefox Mobile (Gecko)</th> + <th>Android</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>基本サポート</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="See_also" name="See_also">関連情報</h2> + +<ul> + <li>{{ domxref("MouseEvent") }}</li> +</ul> |