p5.js
p5.js copied to clipboard
Expand keyIsDown() to work with characters as arguments
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 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.
Screenshots of the change:
PR Checklist
- [ ]
npm run lintpasses - [x] Inline documentation is included / updated
- [ ] Unit tests are included / updated
@wwwld1 We are ready to start merging things into the dev-2.0 branch. Is this ready for review? Don't worry about the merge conflict, I can help resolve it.