p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
This is a working draft of this issue #6798 which allows for keyIsDown() to accept alphanumeric String params such as 'w' or 'W'. Regarding the confusing case of the int 4 versus string '4', this implementation includes both where the string parameter e.g. '4' reflects the ASCII value of '4' while the int parameter e.g. 4 reflects the ASCII code 4.
The documentation is also updated to reflect the changes with examples now included for the new changes.
Resolves #6798
Changes:
This is a working draft of this issue #6798 which allows for
keyIsDown()
to accept alphanumeric String params such as'w'
or'W'
. Regarding the confusing case of the int4
versus string'4'
, this implementation includes both where the string parameter e.g.'4'
reflects the ASCII value of'4'
while the int parameter e.g.4
reflects the ASCII code4
.The documentation is also updated to reflect the changes with examples now included for the new changes.
Screenshots of the change:
PR Checklist
npm run lint
passes