Key press doesn't always trigger
bhperry opened this issue · 6 comments
I've noticed that sometimes win.Pressed(pixelgl.KeyLeftControl)
doesn't trigger. Haven't noticed an issue with any other keys. Wondering if there are any known issues around that, or just something wrong with my setup (I am running my game on Windows 10 WSL with an X11 server, so there could very well be something strange going on there).
Pretty sure it was the X server causing issues. Finally got my windows cross-compiling working and it runs a lot better natively. Still can't get it to compile directly on win10 though unfortunately. There seems to be a problem with compiling cgo applications in windows.
Aaannnnd it's failing again. Windows is the worst.
What was the fix?
The problem was the X-Server not always forwarding keypresses. My last comment was about failing to build Go on windows, not that the keypress issue had returned. Ended up figuring out that my antivirus (Webroot) causes serious problems with Golang, so after uninstalling that I was able to build and run Go natively rather than needing to use WSL.
WSL is awesome, just not great when you need to run graphics.
Ayy there we go, that's the info I was after. In future, other people might have the same issue as you, and even though it's not something to do with pixel, "I was using WSL and some antivirus and that caused a problem" could help them out. :)
Yeah good call. Felt like I was just talking to myself, but you're right it could be useful for someone in the future. The AV thing drove me absolutely insane for quite a while.