From 83b75db14c2091fa0c1f66e65a4809bd9405f836 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 13 Dec 2024 17:01:20 -0800 Subject: [PATCH] f --- .../Components/Pressable/Pressable.js | 2 -- .../Libraries/Components/View/View.js | 21 ------------------- .../Components/View/ViewPropTypes.js | 2 -- .../Libraries/Types/CoreEventTypes.d.ts | 2 +- .../Libraries/Types/CoreEventTypes.js | 2 +- 5 files changed, 2 insertions(+), 27 deletions(-) diff --git a/packages/react-native/Libraries/Components/Pressable/Pressable.js b/packages/react-native/Libraries/Components/Pressable/Pressable.js index b36c041616baed..d1c9433ebc83b7 100644 --- a/packages/react-native/Libraries/Components/Pressable/Pressable.js +++ b/packages/react-native/Libraries/Components/Pressable/Pressable.js @@ -188,7 +188,6 @@ type Props = $ReadOnly<{| /** * Array of keys to receive key down events for. These events have their default native behavior prevented. - * Overrides the props `validKeysDown`, `validKeysUp` and `passthroughAllKeyEvents` * * @platform macos */ @@ -196,7 +195,6 @@ type Props = $ReadOnly<{| /** * Array of keys to receive key up events for. These events have their default native behavior prevented. - * Overrides the props `validKeysDown`, `validKeysUp` and `passthroughAllKeyEvents` * * @platform macos */ diff --git a/packages/react-native/Libraries/Components/View/View.js b/packages/react-native/Libraries/Components/View/View.js index b6d1a58202cebd..ff32a275841bb0 100644 --- a/packages/react-native/Libraries/Components/View/View.js +++ b/packages/react-native/Libraries/Components/View/View.js @@ -54,9 +54,6 @@ const View: React.AbstractComponent< nativeID, tabIndex, // [macOS - passthroughAllKeyEvents, - validKeysDown, - validKeysUp, keyDownEvents, keyUpEvents, // macOS] @@ -101,19 +98,6 @@ const View: React.AbstractComponent< }; } - // [macOS - let _passthroughAllKeyEvents = passthroughAllKeyEvents; - let _validKeysDown = validKeysDown; - let _validKeysUp = validKeysUp; - if (keyDownEvents || keyUpEvents) { - _passthroughAllKeyEvents = true; - // $FlowFixMe[incompatible-type] - _validKeysDown = keyDownEvents; - // $FlowFixMe[incompatible-type] - _validKeysUp = keyUpEvents; - } - // macOS] - const actualView = ( ); diff --git a/packages/react-native/Libraries/Components/View/ViewPropTypes.js b/packages/react-native/Libraries/Components/View/ViewPropTypes.js index 2390d966fb6081..b10219ceb1884d 100644 --- a/packages/react-native/Libraries/Components/View/ViewPropTypes.js +++ b/packages/react-native/Libraries/Components/View/ViewPropTypes.js @@ -113,7 +113,6 @@ export type KeyboardEventProps = $ReadOnly<{| /** * Array of keys to receive key down events for. These events have their default native behavior prevented. - * Overrides the props `validKeysDown`, `validKeysUp` and `passthroughAllKeyEvents` * * @platform macos */ @@ -121,7 +120,6 @@ export type KeyboardEventProps = $ReadOnly<{| /** * Array of keys to receive key up events for. These events have their default native behavior prevented. - * Overrides the props `validKeysDown`, `validKeysUp` and `passthroughAllKeyEvents` * * @platform macos */ diff --git a/packages/react-native/Libraries/Types/CoreEventTypes.d.ts b/packages/react-native/Libraries/Types/CoreEventTypes.d.ts index 88d32463272586..66ba5ecb85b8f1 100644 --- a/packages/react-native/Libraries/Types/CoreEventTypes.d.ts +++ b/packages/react-native/Libraries/Types/CoreEventTypes.d.ts @@ -285,7 +285,7 @@ export interface NativeKeyEvent { } /** - * Represents a key that could be passed to `validKeysDown` and `validKeysUp`. + * Represents a key that could be passed to `keyDownEvents` and `keyUpEvents`. * * `key` is the actual key, such as "a", or one of the special values: * "Tab", "Escape", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", diff --git a/packages/react-native/Libraries/Types/CoreEventTypes.js b/packages/react-native/Libraries/Types/CoreEventTypes.js index c8f1b917baf105..f506cb4ac7c3c3 100644 --- a/packages/react-native/Libraries/Types/CoreEventTypes.js +++ b/packages/react-native/Libraries/Types/CoreEventTypes.js @@ -310,7 +310,7 @@ export type KeyEvent = SyntheticEvent< >; /** - * Represents a key that could be passed to `validKeysDown` and `validKeysUp`. + * Represents a key that could be passed to `KeyDownEvents` and `KeyUpEvents`. * * `key` is the actual key, such as "a", or one of the special values: * "Tab", "Escape", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown",