We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Beginner question:
The behaviour of keyTyped
appears to behave differently with different OpenGL vs default backends.
In the example below, the code generated multiple keyTyped
calls on holding down a key, but only with the default backed. As soon as I switch to P3D
or P2D
in the size()
call, the key repeat stops working, and I only get one keyPressed
and keyReleased
pair.
The keys in question are UP
and DOWN
, the behaviour is analogous for letter keys.
I have disabled ApplePressAndHoldEnabled
previously
Is this an OpenGL issue? Should there be some additional setup for an openGL backend?
void setup() {
size(200, 200, P3D); // Works with default, does not work with P2D or P3D
}
void draw() { }
void keyPressed() {
println("pressed " + int(key) + " " + keyCode);
}
void keyTyped() {
println("typed " + int(key) + " " + keyCode);
}
void keyReleased() {
println("released " + int(key) + " " + keyCode);
}
OS: MacOS High Sierra (10.13.3) Version: Processing 3.3.6
Thanks!
Answers
Here is more about it: https://github.com/processing/processing/issues/5441