Hi, I’ve mainly been working in p5.js, and some time ago, I was porting one of my javascript games to processing and I noticed there isn’t really and equivalent in processing. I’ve tried:
if (keyPressed) {
switch key {
case "a":
// do thing
break;
case "b":
// do other thing
break;
}
}
but this doesn’t work if both are pressed and I’ve also tried with if statements. Is there an equivalent to this in processing? I want the key detection to work for every frame similar to the keyIsDown() function in p5js. Thanks!