Below is the code I am working with in processing. I want the code to be edited to change the movement of the ellipse on the canvas on pressing any key from the keyboard.
float circleX = 0;
float circleY = 0;
float xSpeed = 2.5;
float ySpeed = 2;
void setup() {
size(500, 500);
}
void draw() {
background(0,200,0);
circleX += xSpeed;
if (circleX < 0 || circleX > width) {
xSpeed *= -1;
}
circleY += ySpeed;
if (circleY < 0 || circleY > height) {
ySpeed *= -1;
}
ellipse(circleX, circleY, 100, 100);
}