keyPressed() will fire once for any of the arrow keys, then never again. Many other keys (most letters, for instance) are fine - but some letters will only fire once (e,a,c - for example). This does not happen in editor.p5js.org nor on Opera. Just Chrome....
let counter = 0;
function setup() {
createCanvas(800,800);
}
function draw() {
// put drawing code here
}
function keyPressed(){
counter++;
console.log(counter);
}
I feel this is the same as #3450 and #3193, the solution is being discussed there atm.
@ruairimurphy thanks for filing this issue, this is a really helpful write up!
@sanketsingh24 this issue looks different than #3193 as it doesn't rely on having multiple sketches to reproduce the bug and #3450 hasn't been investigated enough to know if its a bug in the library or just mistakes in the examples. i'd like to keep this issue open and separate (but its good to have them all linked together).
Most helpful comment
@ruairimurphy thanks for filing this issue, this is a really helpful write up!
@sanketsingh24 this issue looks different than #3193 as it doesn't rely on having multiple sketches to reproduce the bug and #3450 hasn't been investigated enough to know if its a bug in the library or just mistakes in the examples. i'd like to keep this issue open and separate (but its good to have them all linked together).