Skip to content

Comparison with react-native-hotkeys, how do we bring the best possible solution to the community? #74

Description

@robertherber

Hi @kevinejohn,

I'm the maintainer of (react-native-hotkeys)[https://github.com/kingstinct/react-native-hotkeys]. Just pinging you to see bring the discussion up on how to best handle keyboard input for react-native in general, and see if we maybe can collaborate to bring as good a solution as possible to the community.

Comparison:

  • In terms of platform support both libraries supports iOS, react-native-keyevent supports Android and react-native-hotkeys support web in addition. Background here is that I'm more familiar with the Apple ecosystem (and web) than Android - and use my iPad Magic Keyboard every day.
  • react-native-keyevent seems to listen for all key events, react-native-hotkeys take is more specific in it's listening, both which might have both pros and cons in terms of DX and performance.
  • react-native-hotkeys supports multiple listeners that are executed in the order they're rendered, overridable with priority and with possibility to set a defaultHandler (for example to navigate back on any unhandled Escapes).
  • react-native-hotkeys supports modifier keys as well as non-alphanumerical keys (arrows f ex). By quickly looking at react-native-keyevent I guess it does so for Android but not iOS - is that correct?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions