mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 07:33:55 +00:00
update key example code
This commit is contained in:
parent
928aa6aaee
commit
0270af042b
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user