mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
update keyboard example code, #238
This commit is contained in:
parent
b5f6d20a74
commit
c4a29c3476
@ -39,6 +39,7 @@ func keyTap() {
|
||||
// press "enter"
|
||||
robotgo.KeyTap("enter")
|
||||
robotgo.KeyTap("a")
|
||||
robotgo.MilliSleep(100)
|
||||
robotgo.KeyTap("a", "ctrl")
|
||||
|
||||
// hide window
|
||||
@ -72,7 +73,9 @@ func keyTap() {
|
||||
func keyToggle() {
|
||||
robotgo.KeyToggle("a", "down")
|
||||
robotgo.KeyToggle("a", "down", "alt")
|
||||
robotgo.Sleep(1)
|
||||
robotgo.KeyToggle("a", "up", "alt", "cmd")
|
||||
robotgo.MilliSleep(100)
|
||||
robotgo.KeyToggle("q", "up", "alt", "cmd", "shift")
|
||||
|
||||
err := robotgo.KeyToggle("enter", "down")
|
||||
|
Loading…
Reference in New Issue
Block a user