Skip to content

Return and Space keys do not trigger onPress events #1622

@tom-un

Description

@tom-un

Environment

react-native -v: 0.68.57-microsoft.0
npm ls react-native-macos: 0.68.57
node -v: v16.17.1
npm -v: 8.15.0
yarn --version: 1.22.19
xcodebuild -version: Xcode 14.1 Build version 14B47b

Steps to reproduce the bug

  1. Go to System Settings and enable Keyboard Navigation:

KeyboardNavigation

  1. In RNTester, go to the Pressable page

  2. Press the Tab key to move the focus ring to a Presable

  3. Press Return key or Space bar

Expected Behavior

Pressing Return or Space should trigger the press of the Pressable

Actual Behavior

The system Beep chimes and no press event is triggered
ReturnKeyNOP

Reproducible Demo

No response

Additional context

This is a regression starting in .68.
.68 introduced the validKeysDown prop. It seems like Touchable and Pressable should have "enter" and "space" on by default.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions