Do you want to request a feature or report a bug?
Improvement
What is the current behavior?
SyntheticKeyboardEvent does not currently support the code 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 a keyCode property. It should have a code property as well.
Currently, if you want to use the keyboardEvent's code, you must access it through SyntheticKeyboardEvent's nativeEvent.
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).
Do you want to request a feature or report a bug?
Improvement
What is the current behavior?
SyntheticKeyboardEventdoes not currently support thecodeproperty.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?
SyntheticKeyboardEventalready exposes akeyCodeproperty. It should have acodeproperty 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).