Skip to content

Commit

Permalink
Update files/zh-cn/web/api/keyboard/lock/index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonren0403 authored Oct 24, 2024
1 parent 6754fa3 commit 443eb5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/keyboard/lock/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ navigator.keyboard.lock();

### 捕获指定的按键

以下示例捕获“W”、“A”、“S”和“D”键。无论按键时使用了哪些修饰键,它都会捕获这些键。假设采用标准美国 QWERTY 布局,注册`"KeyW"` 可确保“W”、“Shift+“W”、Control+“W”、Control+Shift+“W”以及所有其他带有“W”的键修饰键组合都发送到应用程序。这同样适用于 `"KeyA"``"KeyS"``"KeyD"`
以下示例捕获“W”、“A”、“S”和“D”键。无论按键时使用了哪些修饰键,它都会捕获这些键。假设采用标准美国 QWERTY 布局,注册 `"KeyW"` 可确保“W”、“Shift+“W”、Control+“W”、Control+Shift+“W”以及所有其他带有“W”的键修饰键组合都发送到应用程序。这同样适用于 `"KeyA"``"KeyS"``"KeyD"`

```js
navigator.keyboard.lock(["KeyW", "KeyA", "KeyS", "KeyD"]);
Expand Down

0 comments on commit 443eb5e

Please sign in to comment.