Update Document & README.md

This commit is contained in:
vCaesar 2016-11-14 18:20:43 +08:00
parent 6cfbf8e2bf
commit 33b05a0daf
4 changed files with 24 additions and 1 deletions

View File

@ -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)
}
```

View File

@ -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)
}
```

9
doc.md
View File

@ -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)
```
###<h3 id="KeyToggle">.KeyToggle(key, down, modifier)</h3>
Hold down or release a key.

View File

@ -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)
```
###<h3 id="KeyToggle">.KeyToggle(key, down, modifier)</h3>
键盘切换,按住或释放一个键位