Color polygon only when key is pressed

event.getKeys can’t tell when a key is released. This is possible, but the coding is a bit more involved (so I often use mouse buttons when I want to monitor for the release as well). Alternatively, the triangle could change colour for a fixed length of time.

Becca’s example here might help.