Assignment 10.3

I used keys on the keyboard to light up the RGB LED different colors when different keys are pressed. The keys used are "r" for the red LED, "g" for the green LED, "b" for the blue LED, and "y", "c", "m", and "w" to light up combinations of the three LEDs to produce yellow, cyan, magenta, and white, respectively. When the key is pressed in the Processing window, the background color is changed also. Here are my codes:

I tried to make it so that pressing a combination of keys would light up the same combination of LEDs, but it would either not turn off when the keys were released or would only light up one of the LEDs.