Open nbeloglazov opened 5 years ago
@anthonygalea do you know of any issues related to key-pressed handler in p5js?
Not aware of any issues but what I just noticed is that when the canvas has focus it works. Haven't had time to check this issue but I have a vague recollection of seeing a commit related to global key events while working on the migration.
Ah yes, this is the commit. Also, in this p5 example it explicitly states "Click on the image to give it focus". Can it be that global is no longer an option as before?
ohhh. Actually I have different problem. I tried now and on macos chrome WASD keys work to steer the ship but left/right/up/down arrow keys don't work.
Yes, for me it's the same, I had only tried WASD keys :) I think it boils down to key-coded?
always returning false
when called from key-as-keyword. See this sketch. Not really understanding this logic.
While testing also found a bug which was fixed with 0.8.0
release of p5js. Under the manual tests i.e. http://localhost:3000/manual, the mouse-and-key-pressed-variable
test, always displays key-pressed
as false
. Submitted https://github.com/cljsjs/packages/pull/1861. Once that's merged we can consider upgrade within quil.
After 3.0.0 the example stopped working propery: key presses don't have any effect http://quil.info/sketches/show/example_nanoscopic