hello, friend thanks for your help, I made the following change in my code, instead of writing
keyCode == 67
wrote:
keyCode == BACKSPACE
but the problem persists
String t = "abcde";
void setup() {
textSize(60);
textAlign (CENTER);
fill (0);
}
void draw () {
background (255);
text (t, width/2, height/2);
}
void keyPressed() {
if (keyCode == BACKSPACE) { //backspace
if (t.length() > 0) t = t.substring(0, max(0, t.length()-1));
} else {
if (key > 31 && key < 127 && t.length() < 10) {
t += key;
}
}
}
void mousePressed () {
openKeyboard ();
}
apparently this problem occurs in huawei devices but in sansung it works fine, Thanks to Noel, he gave me the solution, install Hacker’s keyboard from google play. but I would like to find a more elegant solution.