with your suggestions I think I have solved it, now I have to try sending the text to arduino
//String notDef="ï¿¿";
String msg="";
String msg1="";
boolean keyboard = false;
void setup() {
fullScreen();
textFont(createFont("SansSerif", 40 * displayDensity));
fill(0);
}
void draw() {
background(255);
text(msg, 20, height/2);
}
void keyPressed() {
background(200, 50, 30);
// msg+=str(key);
if (keyCode==SHIFT)
{
msg1+=key;
} else {
msg+=key;
}
println(msg);
}
void mousePressed() {
if (!keyboard) {
openKeyboard();
keyboard = true;
} else {
closeKeyboard();
keyboard = false;
}
}
I did it … but it is not clear to me why if in the IF I put msg1, it becomes correct msg.
thank you all