I'm writing a GUI that will take user input from the keyboard. When the user presses a key it calls a function, and when the key is released it calls another. This seems easy enough to do with Tk's KeyPress and KeyRelease. The problem I'm encountering, and it's probably the stupidest thing ever, is what happens when the key is held down. If the user holds the key down, I want the GUI to wait for the key release before doing anything. Instead, the keyboard/computer automatically starts pressing and releasing the key really fast and stops this when the user actually releases the key. How to I get around this?
What I want to do is sort of like a video game. Press and hold left to move left, release to stop. The way it is now, I'll be starting and stopping really fast.
Some sample code: