Skip to content

Commit

Permalink
docs: hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Dec 22, 2023
1 parent d67f9cf commit e911a69
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
15 changes: 11 additions & 4 deletions DOC.md
Expand Up @@ -6741,10 +6741,17 @@ const hotkey: {

Register keyboard listener.

|Name |Desc |
|--------|------------|
|key |Key string |
|listener|Key listener|
|Name |Desc |
|--------|--------------|
|key |Key string |
|options |Hotkey options|
|listener|Key listener |

Options:

|Name |Desc |
|----------------|--------------|
|element=document|Target element|

### off

Expand Down
7 changes: 7 additions & 0 deletions DOC_CN.md
Expand Up @@ -6737,8 +6737,15 @@ const hotkey: {
|参数名|说明|
|-----|---|
|key|按键|
|options|选项|
|listener|监听器|

选项:

|参数名|说明|
|-----|---|
|element=document|目标元素|

### off

注销监听器。
Expand Down
7 changes: 7 additions & 0 deletions i18n/hotkey.md
Expand Up @@ -9,8 +9,15 @@
|参数名|说明|
|-----|---|
|key|按键|
|options|选项|
|listener|监听器|

选项:

|参数名|说明|
|-----|---|
|element=document|目标元素|

### off

注销监听器。
Expand Down
15 changes: 11 additions & 4 deletions src/hotkey.js
Expand Up @@ -4,10 +4,17 @@
*
* Register keyboard listener.
*
* |Name |Desc |
* |--------|------------|
* |key |Key string |
* |listener|Key listener|
* |Name |Desc |
* |--------|--------------|
* |key |Key string |
* |options |Hotkey options|
* |listener|Key listener |
*
* Options:
*
* |Name |Desc |
* |----------------|--------------|
* |element=document|Target element|
*
* ### off
*
Expand Down

0 comments on commit e911a69

Please sign in to comment.