mouse almost works now

the variable "key" in mousepressed() actually contains the letter L
instead of the value 1 ... good to know