View Full Version : Retrieve Input permanently

10-01-2016, 02:57 AM
I want to have some kind of object with xyz coordinates that can move. Now I create a key_callback which moves the object based on the input. But when I bind the key_callback and run the program, it stops after a certain amount of time when I keep pressing a key. I think this is caused because the key_callback isnt called after a while when no event is happening. How can I bypass this to update the coordinates permanently, even if a key is held down?

10-01-2016, 04:01 AM
Add a timer callback. Have the key callback simply keep track of whether the key is up or down, have the timer callback move the object if the key is down.