[p5.js 2.0 RFC Proposal]: Replace deprecated keyCode
functionality and docs with KeyboardEvent.code
& KeyboardEvent.key
web standard replacements
#7436
Labels
Increasing access
Due to the deprecation of the
keyCode
in web standards as shown here and p5.js's reliance on it for keyboard input and all the doc's examples (at least those I've come in contact with) using them it's time to replace them with theirKeyboardEvent.code
&KeyboardEvent.key
web standard replacements in order to guarantee the continued functioning of p5.js without having to.Which types of changes would be made?
Most appropriate sub-area of p5.js?
What's the problem?
keyCode
is still the primary method of detecting key presses despite it being deprecated for a while now.What's the solution?
Replace it with the
KeyboardEvent.code
&KeyboardEvent.key
web standard replacements in order to guarantee the continued functioning of p5.js without having to.Pros (updated based on community comments)
keyCode
.keyCode
s to maintain support with older libraries, not moving forward by adding official support and docs everywhere for the modern alternatives might mean losing the ability to intuitively integrate with libraries.Cons (updated based on community comments)
keyCode
s shouldn't get removed from browsers for at least a couple years if not more than a decade.Proposal status
Under review
The text was updated successfully, but these errors were encountered: