Function KeyTyped () and draw function

Hi, I want to create a code where when I click a key on the keyboard it will play music and draw a rectangle. I have managed to add music using the keyTyped() function but I am not sure how to add a rectangle to the canvas.
Thank you

1 Like

I @JessJess

The following link might help you:

Hope it helps! :slight_smile:

1 Like