actually for real new stuff

This commit is contained in:
caue 2020-03-28 21:48:51 -03:00
parent 1d180ffb5a
commit d5e965f25c
2 changed files with 11 additions and 5 deletions

View File

@ -20,8 +20,16 @@ import (
func main() {
EvChan := hook.Start()
defer hook.End()
for ev := range EvChan {
fmt.Println(ev)
}
// drawing := false
hook.Register(hook.KeyDown, []string{"alt", "p"}, func(e hook.Event) {
fmt.Println("alt-p ", e)
})
hook.Register(hook.KeyDown, []string{}, func(e hook.Event) {
fmt.Println(e.Keycode)
})
<-hook.Process(EvChan)
}
```

View File

@ -28,8 +28,6 @@ import (
"fmt"
"time"
"unsafe"
hook "github.com/robotn/gohook"
)
const (