diff --git a/README.md b/README.md index 0818c12..a3c0172 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,9 @@ func main() { robotgo.TypeString("Hello World") robotgo.KeyTap("enter") robotgo.TypeString("en") + robotgo.KeyTap("i", "alt", "command") + arr := []string{"alt", "command"} + robotgo.KeyTap("i", arr) } ``` diff --git a/README_zh.md b/README_zh.md index a28b49e..95c6f91 100644 --- a/README_zh.md +++ b/README_zh.md @@ -99,6 +99,9 @@ func main() { robotgo.TypeString("Hello World") robotgo.KeyTap("enter") robotgo.TypeString("en") + robotgo.KeyTap("i", "alt", "command") + arr := []string{"alt", "command"} + robotgo.KeyTap("i", arr) } ``` diff --git a/doc.md b/doc.md index 9b0422a..2e42b28 100644 --- a/doc.md +++ b/doc.md @@ -73,6 +73,15 @@ key - See keys. modifier (optional, string or array) - Accepts alt, command (win), control, and shift. +####Examples: + +```Go + robotgo.KeyTap("h", "command") + robotgo.KeyTap("i", "alt", "command") + arr := []string{"alt", "command"} + robotgo.KeyTap("i", arr) +``` + ###

.KeyToggle(key, down, modifier)

Hold down or release a key. diff --git a/zh_doc.md b/zh_doc.md index e1b89f3..8490205 100644 --- a/zh_doc.md +++ b/zh_doc.md @@ -72,10 +72,18 @@ ####参数: 键盘值 - 修饰值(可选类型, 字符串或者数组(数组类型正在添加中)) - 可选值: alt, command (win), control, and shift. + 修饰值(可选类型, 字符串或者数组) - 可选值: alt, command (win), control, and shift. key - See keys. modifier (optional, string or array) - Accepts alt, command (win), control, and shift. +####Examples: + +```Go + robotgo.KeyTap("h", "command") + robotgo.KeyTap("i", "alt", "command") + arr := []string{"alt", "command"} + robotgo.KeyTap("i", arr) +``` ###

.KeyToggle(key, down, modifier)

键盘切换,按住或释放一个键位