Closed jcgcunha closed 6 years ago
Hi, the title of this issue is misleading, the issue refers to key handling. Since ControlP5 receives key events from Processing's PApplet (keyEvents are registered with PApplet using registerMethod inside the ControlWindow class), this might be a Processing issue. See test below which demonstrates the same issue (using Processing 3.2.1 on mac) without using ControlP5.
int cnt = 0;
void setup() {
size(400,400); // keyPressed works as expected
// size(400,400,P3D); // keyPressed does not work as expected
}
void draw() {
}
void keyPressed() {
println("pressed", frameCount, cnt++);
}
void keyReleased() {
println("released");
cnt = 0;
}
Ok, I'm sorry about the misleading issue. It only happened with controlp5 (due to all the circumstances together) so I though it had something to do with the textfields. But yes, I tried your sketch and it's precisely the same. It just gets me crazy not being able to clear the text properly. Thank you for your time.
Hello. Basically I figured out what was making the backspace not work properly on a textfield on my code. If i use opengl which I need, I'm not able to keep pressing backspace to delete the text all at once. Instead I need to press and release, press and release etc... Is there any workaround? Everything else works fine (on my main code) like getting the strings from the textfields by pressing buttons etc.
Not functional with opengl
Fully functional without opengl: