From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/mouseevent/ctrlkey/index.html | 125 +++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 files/ja/web/api/mouseevent/ctrlkey/index.html (limited to 'files/ja/web/api/mouseevent/ctrlkey') 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 +--- +

{{APIRef("DOM Events")}}

+ +

読み取り専用プロパティ MouseEvent.ctrlKey は、イベント発生時に control キーが押されたかどうかを、押されていた (true) または押されていない (false) の{{jsxref("Boolean")}} で返します。

+ +

構文

+ +
var ctrlKeyPressed = instanceOfMouseEvent.ctrlKey
+
+ +

戻り値

+ +

A boolean

+ +

+ +
<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>
+
+ +

仕様

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM3 Events','#widl-MouseEvent-ctrlKey','MouseEvent.ctrlKey')}}{{Spec2('DOM3 Events')}}{{SpecName('DOM2 Events')}}から変更なし
{{SpecName('DOM2 Events','#Events-MouseEvent','MouseEvent.ctrlKey')}}{{Spec2('DOM2 Events')}}最初期の定義
+ +

ブラウザ互換性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
機能EdgeFirefox (Gecko)ChromeInternet ExplorerOperaSafari
基本サポート{{CompatVersionUnknown}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}{{CompatVersionUnknown()}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
機能EdgeFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
基本サポート{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf