-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code
property to SyntheticKeyboardEvent
#11306
Comments
I created the PR #11325 for this. |
the above PR #11325 is stale and closed; should I pick this up? planning to replicate the same and follow the PR suggestions; any tips or idea? |
Can you give me an idea of how widely supported it is? |
@gaearon According to https://caniuse.com/#feat=keyboardevent-code it is supported in all major desktop browsers. Are there any plans to implement this? I am not sure whether I should mark it with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Do you want to request a feature or report a bug?
Improvement
What is the current behavior?
SyntheticKeyboardEvent
does not currently support thecode
property.code
(MDN) is nice to have when you want to write key-specific handling—rather than input-specific (dependent on layout and modifier keys) handling.What is the expected behavior?
SyntheticKeyboardEvent
already exposes akeyCode
property. It should have acode
property as well.Currently, if you want to use the
keyboardEvent
'scode
, you must access it throughSyntheticKeyboardEvent
'snativeEvent
.Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Affects React 16 and earlier (I assume).
The text was updated successfully, but these errors were encountered: