Skip to content
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

Keyboard event inconsistencies with react-native-windows #702

Closed
appden opened this issue Jan 30, 2021 · 2 comments · Fixed by #707
Closed

Keyboard event inconsistencies with react-native-windows #702

appden opened this issue Jan 30, 2021 · 2 comments · Fixed by #707
Labels
bug Something isn't working Partner: Facebook

Comments

@appden
Copy link

appden commented Jan 30, 2021

Issue

The new keyboard events added in #657 has some inconsistencies with the corresponding IKeyboardEvent type in react-native-windows along with the Keyboarding API Proposal.

Some examples:

  • controlKey instead of ctrlKey
  • optionKey instead of altKey
  • commandKey instead of metaKey
  • leftArrowKey instead of key == 'ArrowLeft'

It would be great to get the modifier keys aligned across platforms, especially since the correct ones are already used for mouse events, and it would be especially nice to provide the "virtual key" strings for arrow keys, enter key, etc. (see here in RNW)

Steps to Reproduce

Add onKeyDown/onKeyUp events and log their nativeEvent property.

Expected Behavior

Align as much as possible with react-native-windows and the Keyboarding API Proposal

@jacobp100
Copy link

It looks like the Windows version conforms closer to the W3C spec https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent

@HeyImChris HeyImChris added bug Something isn't working and removed Needs: Triage 🔍 labels Feb 3, 2021
@HeyImChris
Copy link

Thanks for filling this. It's definitely a bug on our end and I've gotten reports from some other React-Native clients about this as well- we'll look into fixing it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Partner: Facebook
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants