Accepting input from the same key twice
in
Programming Questions
•
2 years ago
I need to move a rectangle by pressing a key, but i need it to happen twice using the same key.
So i say use something like:
void keyPressed(){
if (key == ' '){
rect(pos_x, pos_y--, rect_width, rect_height);
}
How can i call this more than once using the same key?
1