How do you handle multiple events at the same time? For example, I have a game. I want to push the right arrow along with the up key. How would I be able to receive the input at the same time?
Looks something like this :
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
I figured it out thanks. What I did to "fix" the problem was to not stop the thread until the keyReleased method was set off by that key (an additional switch statement in my case with "VK_RIGHT" and "VK_LEFT")
Usually something like this is the approach to go for. On key pressed you store the keys somewhere, and on key released you remove them from the storage. All keys in the storage are then the currently pressed keys.
However, moving = false may be premature. What if I still have UP pressed? Aren't I then still moving?