Skip to content

Instantly share code, notes, and snippets.

@simplyluke
Created January 18, 2015 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simplyluke/43614910dc12a72520d9 to your computer and use it in GitHub Desktop.
Save simplyluke/43614910dc12a72520d9 to your computer and use it in GitHub Desktop.
// For the "coded" keys, effectively anything other than a alphanumeric
if ((keyPressed) && (key == CODED) && (keyCode == DOWN)) {
fill(#ff0724); // RED
}
// For alphanumeric
if ((keyPressed) && (key == '8')) {
translate(0, -5);
}
// if you want a caps and lower case to both work
if ((keyPressed) && ((key == 'b') || (key == 'B'))) {
background(255);
} else {
background(0); // BLACK
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment