Daily Creative Coding

元「30 min. Processing」。毎日、Creative Codingします。

キーボードから入力した文字を表示する

/**
* Display of Character from Keyboard
*
* @author aa_debdeb
* @date 2015/11/13
*/

void setup(){
  size(500, 500);
  smooth();
  background(0);
  fill(255);
  textSize(400);
  textAlign(CENTER);
}

void draw(){

}

void keyPressed(){
  background(0);
  char keys[] = {key};
  text(new String(keys), 0, 0, width, height);
}