p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

Expand keyIsDown() to work with characters as arguments

Open wwwld1 opened this issue 1 year ago • 1 comments

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:

image

PR Checklist

wwwld1 avatar Apr 26 '24 20:04 wwwld1

@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.

limzykenneth avatar Sep 12 '24 17:09 limzykenneth