-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Fabric] Add support for native key event handling #12146
Conversation
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Show resolved
Hide resolved
I think the answer is no, but is there any of this PR that happens in common cpp I could at least copy / use as a reference for RN-macOS? I.E: the HandledKeyEvent type, etc? |
The "common" code is in https://github.com/microsoft/react-native-windows/blob/main/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp -- Thats the place on the native side we should align on. |
Description
No current infra for handling keyboard events on the native side.
Type of Change
Why
Space
to toggle switch.What
Adds props parsing for the keyUpEvents and keyDownEvents properties.
Adds a bubbling of key events on the native component tree.
Adds suppression of the key event bubbling in the case of a bubbling key*Events property specifying that it should be suppressed.
Add a method on the native ComponentView's which can be implemented by say ScrollViewer to handle key events natively (Will be useful for #12076)
Microsoft Reviewers: Open in CodeFlow