Open BenMaydan opened 4 years ago
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
I would like to work on this. Seems like an issue with an EventListener.
@BenMaydan I'm not able to replicate this locally, can this be a web editor bug?
with return false
it triggers e.preventDefault()
. my guess is that after the click, the iframe in web editor does not capture the cursor even if you click, and thus doesn't catch key events. If you click on the editor console and hit tab a few times to select iframe, key events are fired properly
sounds right, @micuat see the same https://editor.p5js.org/kll/sketches/tLtOxsq78 here.
I'd like to point out as of April 2022 I fould the same problem as OP, when I call return false on mousePressed() it breaks the code in keyPressed()
This issue only happens in the web editor, please file this bug over here instead. Thanks.
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
Most appropriate sub-area of p5.js?
Details about the bug:
print(key) does not print anything. Code is below
function setup() { createCanvas(400, 400); }
function draw() { background(220); }
function mousePressed() { return false; }
function keyPressed() { print(key); }