add more add event examples

This commit is contained in:
vcaesar 2019-02-22 08:50:56 -04:00
parent ca2a57ea6e
commit 7ec766458d

View File

@ -17,6 +17,25 @@ import (
// "go-vgo/robotgo"
)
func addEvent() {
ok := robotgo.AddEvents("q", "ctrl", "shift")
if ok {
fmt.Println("add events...")
}
ok = robotgo.AddEvents("w")
if ok {
fmt.Println("add events")
}
s := robotgo.Start()
defer robotgo.End()
for ev := range s {
fmt.Println(ev)
}
}
func add() {
fmt.Println("--- Please press v---")
eve := robotgo.AddEvent("v")
@ -61,5 +80,7 @@ func event() {
}
func main() {
addEvent()
event()
}