mirror of
https://github.com/robotn/gohook.git
synced 2025-04-27 22:49:42 +08:00
changed go.mod to reflect the change
This commit is contained in:
parent
35fdcff3ec
commit
3186c43ae7
10
test/main.go
10
test/main.go
@ -4,13 +4,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/cauefcr/gohook"
|
||||
"github.com/cauefcr/ghook"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := hook.Start()
|
||||
defer hook.End()
|
||||
tout := time.After(time.Hour*2)
|
||||
tout := time.After(time.Hour * 2)
|
||||
done := false
|
||||
for !done {
|
||||
select {
|
||||
@ -19,13 +19,13 @@ func main() {
|
||||
if i.Keychar == 'q' {
|
||||
tout = time.After(0)
|
||||
}
|
||||
fmt.Printf("%v key: %c:%v\n",i.Kind, i.Keychar,i.Rawcode)
|
||||
fmt.Printf("%v key: %c:%v\n", i.Kind, i.Keychar, i.Rawcode)
|
||||
} else if i.Kind >= hook.MouseDown && i.Kind < hook.MouseWheel {
|
||||
//fmt.Printf("x: %v, y: %v, button: %v\n", i.X, i.Y, i.Button)
|
||||
}else if i.Kind == hook.MouseWheel {
|
||||
} else if i.Kind == hook.MouseWheel {
|
||||
//fmt.Printf("x: %v, y: %v, button: %v, wheel: %v, rotation: %v\n", i.X, i.Y, i.Button,i.Amount,i.Rotation)
|
||||
} else {
|
||||
fmt.Printf("%+v\n",i)
|
||||
fmt.Printf("%+v\n", i)
|
||||
}
|
||||
case <-tout:
|
||||
fmt.Print("Done.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user