Closed dotKuro closed 5 years ago
Good catch. It looks like all of the functions in the Events module have incorrect type signatures. Most of the functions in this library were auto-generated from the p5.js javadoc, and these were generated incorrectly. I'll put in a fix for this.
Fixed in v0.11.0
keyPressed in P5 is a function name that should be implemented by the user like setup or draw. Confused by the type signature I found on pursuit, I started browsing this source code and it seems like keyPressed (and similiar functions like keyReleased) are implemented like ordinary callable functions like background or rect.
Since these bindings are still under heavy development I don't know if this is a bug or just not finished yet. If there is interest in that, I will contribute a fix for a bug.