comment bloquer un rectangle de sortir de l'écran p5

if ((keyIsPressed == true) && ((key == 'a') || (key == 'A'))) {
Smiling Sloth