The problem with your attempt is that keyPressed() function can only recognise 1 key at the time. I solved it by adding a delay between pressing the keys
Edit: seems I was wrong
The problem with your attempt is that keyPressed() function can only recognise 1 key at the time. I solved it by adding a delay between pressing the keys
Edit: seems I was wrong