update key example code

This commit is contained in:
vcaesar 2018-12-11 10:53:03 -04:00
parent 928aa6aaee
commit 0270af042b

View File

@ -39,6 +39,7 @@ func keyTap() {
// press "enter" // press "enter"
robotgo.KeyTap("enter") robotgo.KeyTap("enter")
robotgo.KeyTap("a", "control") robotgo.KeyTap("a", "control")
// hide window // hide window
robotgo.KeyTap("h", "command") robotgo.KeyTap("h", "command")
robotgo.KeyTap("h", "command", 12) robotgo.KeyTap("h", "command", 12)
@ -46,12 +47,14 @@ func keyTap() {
// press "i", "alt", "command" Key combination // press "i", "alt", "command" Key combination
robotgo.KeyTap("i", "alt", "command") robotgo.KeyTap("i", "alt", "command")
robotgo.KeyTap("i", "alt", "command", 11) robotgo.KeyTap("i", "alt", "command", 11)
arr := []string{"alt", "command"} arr := []string{"alt", "command"}
robotgo.KeyTap("i", arr) robotgo.KeyTap("i", arr)
robotgo.KeyTap("i", arr, 12) robotgo.KeyTap("i", arr, 12)
// close window // close window
robotgo.KeyTap("w", "command") robotgo.KeyTap("w", "command")
// minimize window // minimize window
robotgo.KeyTap("m", "command") robotgo.KeyTap("m", "command")
robotgo.KeyTap("f1", "control") robotgo.KeyTap("f1", "control")