aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/keyboardevent
diff options
context:
space:
mode:
authorYujiSoftware <yuji.software+github@gmail.com>2022-03-02 20:22:51 +0900
committerIrvin <irvinfly@gmail.com>2022-03-04 01:03:17 +0800
commit9a110dee28ae2ef12ee014b98fda6bae6ee48edb (patch)
tree6525763f4313d7d8f42aefa699765f61ee1c63df /files/zh-cn/web/api/keyboardevent
parenteeddb651b6e8deb8ecabc2bc5bc28c8ead25cca5 (diff)
downloadtranslated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.tar.gz
translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.tar.bz2
translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.zip
Migrate to Compat macro (zh-cn)
Diffstat (limited to 'files/zh-cn/web/api/keyboardevent')
-rw-r--r--files/zh-cn/web/api/keyboardevent/altkey/index.html50
-rw-r--r--files/zh-cn/web/api/keyboardevent/charcode/index.html54
-rw-r--r--files/zh-cn/web/api/keyboardevent/ctrlkey/index.html52
-rw-r--r--files/zh-cn/web/api/keyboardevent/iscomposing/index.html50
-rw-r--r--files/zh-cn/web/api/keyboardevent/keyboardevent/index.html70
-rw-r--r--files/zh-cn/web/api/keyboardevent/keycode/index.html58
-rw-r--r--files/zh-cn/web/api/keyboardevent/repeat/index.html52
-rw-r--r--files/zh-cn/web/api/keyboardevent/shiftkey/index.html52
8 files changed, 8 insertions, 430 deletions
diff --git a/files/zh-cn/web/api/keyboardevent/altkey/index.html b/files/zh-cn/web/api/keyboardevent/altkey/index.html
index 0987f3ea89..4d8dfcb99f 100644
--- a/files/zh-cn/web/api/keyboardevent/altkey/index.html
+++ b/files/zh-cn/web/api/keyboardevent/altkey/index.html
@@ -69,55 +69,7 @@ You can also use the SHIFT key together with the ALT key.
<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">特性
-<table class="compat-table">
- <tbody>
- <tr>
- <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>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>
+{{Compat("api.KeyboardEvent.altKey")}}
<h2 id="See_also" name="See_also">参考</h2>
diff --git a/files/zh-cn/web/api/keyboardevent/charcode/index.html b/files/zh-cn/web/api/keyboardevent/charcode/index.html
index fe6523a655..3e96299523 100644
--- a/files/zh-cn/web/api/keyboardevent/charcode/index.html
+++ b/files/zh-cn/web/api/keyboardevent/charcode/index.html
@@ -89,56 +89,4 @@ alert("Key Pressed: " + String.fromCharCode(e.charCode) + "\n"
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特性</th>
- <th>Chrome</th>
- <th>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>基本支持</td>
- <td>26 (probably earlier)</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>3</td>
- <td>9</td>
- <td>12.1</td>
- <td>5.1 (probably earlier)</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特性</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Edge</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>基本支持</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>5.1 (probably earlier)</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("api.KeyboardEvent.charCode")}}
diff --git a/files/zh-cn/web/api/keyboardevent/ctrlkey/index.html b/files/zh-cn/web/api/keyboardevent/ctrlkey/index.html
index 16d60aa08a..fd54d8fcf9 100644
--- a/files/zh-cn/web/api/keyboardevent/ctrlkey/index.html
+++ b/files/zh-cn/web/api/keyboardevent/ctrlkey/index.html
@@ -67,57 +67,7 @@ You can also use the SHIFT key together with the CTRL key.&lt;/p&gt;
<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>
+{{Compat("api.KeyboardEvent.ctrlKey")}}
<h2 id="See_also" name="See_also">参考</h2>
diff --git a/files/zh-cn/web/api/keyboardevent/iscomposing/index.html b/files/zh-cn/web/api/keyboardevent/iscomposing/index.html
index a265d70461..1d61b65642 100644
--- a/files/zh-cn/web/api/keyboardevent/iscomposing/index.html
+++ b/files/zh-cn/web/api/keyboardevent/iscomposing/index.html
@@ -44,55 +44,7 @@ console.log(kbdEvent.isComposing); // return false
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特性</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari (WebKit)</th>
- </tr>
- <tr>
- <td>基本支持</td>
- <td>{{ CompatChrome(56.0) }}</td>
- <td>{{ CompatGeckoDesktop("31.0") }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatOpera(43) }}</td>
- <td>{{ CompatNo() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特性</th>
- <th>Android Webview</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Phone</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- <th>Chrome for Android</th>
- </tr>
- <tr>
- <td>基本支持</td>
- <td>{{ CompatChrome(56.0) }}</td>
- <td>{{ CompatGeckoMobile("31.0") }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatOperaMobile(43) }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatChrome(56.0) }}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("api.KeyboardEvent.isComposing")}}
<h2 class="note" id="参考">参考</h2>
diff --git a/files/zh-cn/web/api/keyboardevent/keyboardevent/index.html b/files/zh-cn/web/api/keyboardevent/keyboardevent/index.html
index 86c792ce4a..aa8bb1d804 100644
--- a/files/zh-cn/web/api/keyboardevent/keyboardevent/index.html
+++ b/files/zh-cn/web/api/keyboardevent/keyboardevent/index.html
@@ -74,75 +74,7 @@ translation_of: Web/API/KeyboardEvent/KeyboardEvent
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特性</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>基本支持</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatGeckoDesktop(31) }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- </tr>
- <tr>
- <td>初始化 <code>code</code> 和 <code>key</code></td>
- <td>{{CompatChrome(49.0)}}</td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特性</th>
- <th>Android</th>
- <th>Android Webview</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- <th>Chrome for Android</th>
- </tr>
- <tr>
- <td>基本支持</td>
- <td>{{ CompatUnknown }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatGeckoMobile(31) }}</td>
- <td>{{ CompatNo() }}</td>
- <td>{{ CompatVersionUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td>初始化 <code>code</code> 和 <code>key</code></td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome(49.0)}}</td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td>{{CompatChrome(49.0)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("api.KeyboardEvent.KeyboardEvent")}}
<h2 id="参考">参考</h2>
diff --git a/files/zh-cn/web/api/keyboardevent/keycode/index.html b/files/zh-cn/web/api/keyboardevent/keycode/index.html
index d281b40d60..10f3803afd 100644
--- a/files/zh-cn/web/api/keyboardevent/keycode/index.html
+++ b/files/zh-cn/web/api/keyboardevent/keycode/index.html
@@ -55,63 +55,7 @@ translation_of: Web/API/KeyboardEvent/keyCode
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特征</th>
- <th>谷歌</th>
- <th>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>基础支持</td>
- <td>26 (probably earlier)</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>3.0 (possibly earlier)</td>
- <td>6</td>
- <td>11.6 (probably earlier)</td>
- <td>5 (probably earlier)</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>特征</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Edge</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>基础支持</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>
- <p>5.1</p>
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>{{Compat("api.KeyboardEvent.keyCode")}}</p>
+{{Compat("api.KeyboardEvent.keyCode")}}
<h2 id="键码值">键码值</h2>
diff --git a/files/zh-cn/web/api/keyboardevent/repeat/index.html b/files/zh-cn/web/api/keyboardevent/repeat/index.html
index d18d39473e..c35e22442e 100644
--- a/files/zh-cn/web/api/keyboardevent/repeat/index.html
+++ b/files/zh-cn/web/api/keyboardevent/repeat/index.html
@@ -32,54 +32,4 @@ translation_of: Web/API/KeyboardEvent/repeat
<h2 id="兼容性">兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari (WebKit)</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{ CompatGeckoDesktop(28) }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Edge</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Phone</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{ CompatGeckoMobile(28) }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- <td>{{ CompatUnknown() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("api.KeyboardEvent.repeat")}}
diff --git a/files/zh-cn/web/api/keyboardevent/shiftkey/index.html b/files/zh-cn/web/api/keyboardevent/shiftkey/index.html
index 29f5baefdc..98471595f2 100644
--- a/files/zh-cn/web/api/keyboardevent/shiftkey/index.html
+++ b/files/zh-cn/web/api/keyboardevent/shiftkey/index.html
@@ -69,57 +69,7 @@ You can also use the SHIFT key together with the ALT key.&lt;/p&gt;
<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>
+{{Compat("api.KeyboardEvent.shiftKey")}}
<h2 id="See_also" name="See_also">参考</h2>