Skip to content

onKeyDown is not registered until component is clicked. #2662

Open
@ali-sao

Description

@ali-sao

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

I am unable to register the onKeyDown unless the component is being clicked.

Expected behavior

I am expecting both event handlers to be working simultaneously

Steps to reproduce

  • Use the official template
  • open the console hit any key
  • Try to click on the pressable component.
  • Hit any key again to see the onKeyDown is logging the keycode successfully/

Test case

https://codesandbox.io/p/devbox/react-native-web-examples-4kq2h4?embed=1&file=%2Fpages%2Fpressable%2Findex.js

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions