Cover
Reference
Tutorials
Bugs
# Click on the image to give it focus, and then press any key.
value <- 0
draw <- function() {
fill(value)
rect(25, 25, 50, 50)
}
keyReleased <- function() {
if (value == 0) {
value = 255
} else {
value = 0
}
}
keyReleased() keyReleased(event)
| event | MouseEvent: the MouseEvent |
|---|