mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-19 14:23: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"
|
// press "enter"
|
||||||
robotgo.KeyTap("enter")
|
robotgo.KeyTap("enter")
|
||||||
robotgo.KeyTap("a")
|
robotgo.KeyTap("a")
|
||||||
|
robotgo.MilliSleep(100)
|
||||||
robotgo.KeyTap("a", "ctrl")
|
robotgo.KeyTap("a", "ctrl")
|
||||||
|
|
||||||
// hide window
|
// hide window
|
||||||
@ -72,7 +73,9 @@ func keyTap() {
|
|||||||
func keyToggle() {
|
func keyToggle() {
|
||||||
robotgo.KeyToggle("a", "down")
|
robotgo.KeyToggle("a", "down")
|
||||||
robotgo.KeyToggle("a", "down", "alt")
|
robotgo.KeyToggle("a", "down", "alt")
|
||||||
|
robotgo.Sleep(1)
|
||||||
robotgo.KeyToggle("a", "up", "alt", "cmd")
|
robotgo.KeyToggle("a", "up", "alt", "cmd")
|
||||||
|
robotgo.MilliSleep(100)
|
||||||
robotgo.KeyToggle("q", "up", "alt", "cmd", "shift")
|
robotgo.KeyToggle("q", "up", "alt", "cmd", "shift")
|
||||||
|
|
||||||
err := robotgo.KeyToggle("enter", "down")
|
err := robotgo.KeyToggle("enter", "down")
|
||||||
|
Loading…
Reference in New Issue
Block a user