So, my question was most likely already asked, but I didn\'t know what to search for, and didnt find much. So, my problem is, I made 2 functions, which would check for an e
I would advice you to stick with the event-driven approach rather than using a polling mechanism.
You should let the key events alter some internal state to reflect a pressed key imo.
Example: You are controlling a spaceship with your keyboard. You want the propulsion rockets to fire when you press one of 'w', 's', 'a' or 'd' to make the ship accelerate in a certain direction:
This will effectively make the object accelerate while a movement key is pressed, and stop accelerating when the key is released.