Following the question I have asked before at
I am wondering on how to write the code such that the program will respond when 2 arrow keys are pressed at the same time. In other words, I would like to have the program to behave like a racing game.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In order to find out if two keys are pressed at the same time, you’ll need to store a list of keys that have been pressed, removing keys from the list when they are unpressed. You can then compare what’s in the list to set patterns to see if it matches any of the ones that you are looking for.