Skip to content
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

Return event instead of keyCode #12

Merged
merged 3 commits into from
Dec 4, 2017
Merged

Conversation

badaz
Copy link
Contributor

@badaz badaz commented Nov 24, 2017

Hi,

thanks for this module, I had to use it in a project an I found that it lacked the possibility to get more from the event than just the keyCode, therefore I modified it a little so that it returns an event containing the keyCode, the action and the characters in case of a keyCode UNKNOW + action MULTIPLE. I also added a listener on onKeyMultiple.

I know it is breaking and I'm sorry about that. One possibility would be to add a param to the onKeyXXXListener methods to get an event instead of just the keyCode.

public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added this for compatibility with older versions of RN

@kevinejohn
Copy link
Owner

This looks good to me. I appreciate the PR!

@kevinejohn kevinejohn merged commit 03e488c into kevinejohn:master Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants