blob: 1db37aaa2fa443a7766a390ad7e7f96537ec4f1a (
plain)
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
35
36
37
38
39
40
41
|
---
title: Navigator.keyboard
slug: Web/API/Navigator/keyboard
translation_of: Web/API/Navigator/keyboard
---
<div>{{SeeCompatTable}}{{APIRef("Keyboard API")}}</div>
<p><span class="seoSummary">The <strong><code>keyboard</code></strong> read-only property of the {{domxref("navigator")}} interface returns a {{domxref('Keyboard')}} object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard. </span></p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox">var <var>keyboard</var> = navigator.keyboard</pre>
<h3 id="Value">Value</h3>
<p>一个 {{domxref('Keyboard')}} 对象.</p>
<h2 id="规范">规范</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('Keyboard Map','#navigator-interface','keyboard')}}</td>
<td>{{Spec2('Keyboard Map')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("api.navigator.keyboard")}}</p>
|