basically I have to use Processing for a project (not out of choice) and have come across a problem regarding the pressing of multiple keys at once. In the keyPressed()function, I have multiple conditionals, each mapping a key to an action. This is all well and good, but supposing I want to press multiple keys at once?
Any suggestions?
Thanks.
Create an array. Assign a numeric value to each key that you are checking, then turn on the corresponding value in the array on or off whenever a key is pressed or released. Then in the draw() you check the values of the array to see which are on and off at any given instant.