go-vgo / robotgo

RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
Apache License 2.0
9.47k stars 862 forks source link

hook.Register() can't bind `f1~f12` when KeyUp and KeyDown #574

Open jackpoi opened 1 year ago

jackpoi commented 1 year ago
hook.Register(hook.KeyHold, []string{"f10"}, func(e hook.Event) {
    fmt.Println(e)
})
s := hook.Start()
<-hook.Process(s)

Description

hook.Register() cannot bind f1~f12, it only works when using KeyHold, using KeyUp and KeyDown have no effect, and neither do combination keys like []string{"alt", "f10"}

esceer commented 1 year ago

I have the same issue.

duolabmeng6 commented 1 year ago

I am also the same problem how to fix

duolabmeng6 commented 1 year ago

Already solved code here https://github.com/duolabmeng6/go-qoq/blob/master/mymodel/%E9%94%AE%E4%BB%A3%E7%A0%81.go