aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/keyboardevent/altkey/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/de/web/api/keyboardevent/altkey/index.html')
-rw-r--r--files/de/web/api/keyboardevent/altkey/index.html118
1 files changed, 118 insertions, 0 deletions
diff --git a/files/de/web/api/keyboardevent/altkey/index.html b/files/de/web/api/keyboardevent/altkey/index.html
new file mode 100644
index 0000000000..3f16f6d710
--- /dev/null
+++ b/files/de/web/api/keyboardevent/altkey/index.html
@@ -0,0 +1,118 @@
+---
+title: KeyboardEvent.altKey
+slug: Web/API/KeyboardEvent/altKey
+translation_of: Web/API/KeyboardEvent/altKey
+---
+<p id="Summary">{{APIRef("DOM Events")}}</p>
+
+<p>Der Konstruktor <strong><code>KeyboardEvent.altKey</code></strong> hat die Eigenschaft {{jsxref("Boolean")}} und zeigt an ob <kbd>alt</kbd> Taste (<kbd>Option</kbd> oder <kbd>⌥</kbd> in OS X) gedrückt wurde (<code>true</code>) oder (<code>false</code>) nicht gerdrückt wurde, wenn das Ereignis eintritt.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">var <em>altKeyPressed</em> = <em>instanceOfKeyboardEvent</em>.altKey
+</pre>
+
+<h2 id="Examples">Examples</h2>
+
+<pre class="brush: js">&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;altKey example&lt;/title&gt;
+
+&lt;script type="text/javascript"&gt;
+
+function showChar(e){
+ alert(
+ "Key Pressed: " + String.fromCharCode(e.charCode) + "\n"
+ + "charCode: " + e.charCode + "\n"
+ + "ALT key pressed: " + e.altKey + "\n"
+ );
+}
+
+&lt;/script&gt;
+&lt;/head&gt;
+
+&lt;body onkeypress="showChar(event);"&gt;
+&lt;p&gt;
+Press any character key,
+with or without holding down the ALT key.&lt;br /&gt;
+You can also use the SHIFT key together with the ALT key.
+&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;</pre>
+
+<h2 id="Specifications">Specifications</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-KeyboardEvent-altKey','KeyboardEvent.altkey')}}</td>
+ <td>{{Spec2('DOM3 Events')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Chrome</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</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>Feature</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>Basic support</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">See also</h2>
+
+<ul>
+ <li>{{ domxref("KeyboardEvent") }}</li>
+</ul>