Created
January 20, 2018 04:12
-
-
Save jeffnoko/cd2b30f9e28b7041f82d46e58e6db514 to your computer and use it in GitHub Desktop.
Processing: mouse click with modifier key.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void mouseClicked() { | |
if (modifierKey == 'c') { | |
println("C+mouse"); | |
} else if (modifierKey == 's') { | |
println("S+mouse"); | |
} | |
} | |
char modifierKey; | |
void keyPressed() { | |
modifierKey = key; | |
} | |
void keyReleased() { | |
modifierKey = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment