This commit is contained in:
白茶清欢 2023-09-16 21:20:15 +08:00
parent 93eacb31bf
commit 660d2504ec
1 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package main
import (
"fmt"
"time"
hook "github.com/robotn/gohook"
)
@ -16,7 +17,9 @@ func main() {
hook.Register(hook.KeyDown, []string{
"1",
}, func(e hook.Event) {
fmt.Println("=========", string(e.Keychar), "====", e.String())
fmt.Println(
"按键 : ", string(e.Keychar),
"触发时间 : ", time.Now().Format("2006-01-02 15:04:05"))
//hook.End()
})