update key example code

This commit is contained in:
vcaesar 2020-03-11 14:29:07 -04:00
parent 519c7bf718
commit 614483dabc

View File

@ -74,6 +74,7 @@ func keyToggle() {
robotgo.KeyToggle("a", "down") robotgo.KeyToggle("a", "down")
robotgo.KeyToggle("a", "down", "alt") robotgo.KeyToggle("a", "down", "alt")
robotgo.Sleep(1) robotgo.Sleep(1)
robotgo.KeyToggle("a", "up", "alt", "cmd") robotgo.KeyToggle("a", "up", "alt", "cmd")
robotgo.MilliSleep(100) robotgo.MilliSleep(100)
robotgo.KeyToggle("q", "up", "alt", "cmd", "shift") robotgo.KeyToggle("q", "up", "alt", "cmd", "shift")
@ -88,7 +89,11 @@ func cilp() {
// robotgo.TypeString("en") // robotgo.TypeString("en")
// write string to clipboard // write string to clipboard
robotgo.WriteAll("テストする") e := robotgo.WriteAll("テストする")
if e != nil {
fmt.Println("robotgo.WriteAll err is: ", e)
}
// read string from clipboard // read string from clipboard
text, err := robotgo.ReadAll() text, err := robotgo.ReadAll()
if err != nil { if err != nil {