Closed karreiro closed 5 years ago
Hi @micmonay, very interesting project! :-)
I'm woking in a bot that plays Stardew Valley, and I've noticed an odd behaviour on macOS. When a key is pressed, it's not being released.
I've checked this doc, and apparently this PR fixes the issue.
See my bot running before my changes:
..and here's my bot running with the changes proposed by this PR:
Btw, here's the code that my bot performs:
package main import ( "time" "github.com/micmonay/keybd_event" ) func main() { time.Sleep(1 * time.Second) kb, err := keybd_event.NewKeyBonding() if err != nil { panic(err) } kb.SetKeys(keybd_event.VK_D) kb.Launching() }
Hi
Big thanks for your PR. I don't find this on my tests because of my Mac OS, continuous press on the key haven't no affect the output.
Good week !
Hi @micmonay, very interesting project! :-)
I'm woking in a bot that plays Stardew Valley, and I've noticed an odd behaviour on macOS. When a key is pressed, it's not being released.
I've checked this doc, and apparently this PR fixes the issue.
See my bot running before my changes:
..and here's my bot running with the changes proposed by this PR:
Btw, here's the code that my bot performs: