processing / p5.js

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 —
http://p5js.org/
GNU Lesser General Public License v2.1
21.51k stars 3.29k forks source link

Expand keyIsDown() to work with characters as arguments #6983

Closed wwwld1 closed 5 months ago

wwwld1 commented 5 months ago

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

welcome[bot] commented 5 months ago

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

limzykenneth commented 5 months ago

Hi @wwwld1, we are currently not looking for implementation of any of the 2.0 related proposals as they still need to be agreed upon and approved before we organize their implementation. There are also things that needed to be discussed for each proposals in detail before implementation should start.

If you wish to submit a proof of concept, you can work against the dev-2.0 branch instead of the main branch. Thanks.

wwwld1 commented 5 months ago

Hi @wwwld1, we are currently not looking for implementation of any of the 2.0 related proposals as they still need to be agreed upon and approved before we organize their implementation. There are also things that needed to be discussed for each proposals in detail before implementation should start.

If you wish to submit a proof of concept, you can work against the dev-2.0 branch instead of the main branch. Thanks.

Hi @limzykenneth , thank you! I just made another PR over dev-2.0 branch.