We are about to switch to a new forum software. Until then we have removed the registration on this forum.
How do I use keyboard input to display Text on the screen using text string ?
https://processing.org/reference/addassign.html
Demo below.
Kf
String mainText; void setup(){ size(400,200); fill(255); mainText=""; textAlign(CENTER,CENTER); } void draw(){ background(0); text(mainText,width/2,height/2); } void keyPressed(){ if(key>='a' && key<='z'){ mainText += key; } if(key==ENTER) mainText=""; }
Please link between crossposts. This question has been crossposted here.
Answers
https://processing.org/reference/addassign.html
Demo below.
Kf
Please link between crossposts. This question has been crossposted here.