arrow keys Feel free to use this just make sure to add credit.
This is an improved version of a code that I used to use all the time it makes it so that you can hit a wall and stop exactly right next to it instead of several pixels away from it. This will allow for your sprites to move at higher speeds than my previous code would have allowed.