1let value = 0;
2function draw() {
3 fill(value);
4 rect(25, 25, 50, 50);
5}
6function keyTyped() {
7 if (key === 'a') {
8 value = 255;
9 } else if (key === 'b') {
10 value = 0;
11 }
12 // uncomment to prevent any default behavior
13 // return false;
14}