ayrton / react-key-handler

React component to handle keyboard events :key:
http://ayrton.be/react-key-handler
388 stars 29 forks source link

Same behaviour as React keyboard events #17

Closed ayrton closed 8 years ago

ayrton commented 8 years ago

This is an ongoing effort to have the exact same behaviour as react keyboard events.

Thanks to @princed for pointing this out.

princed commented 8 years ago

Just wondering, why not depend directly on https://github.com/facebook/react/blob/master/src/renderers/dom/client/utils/getEventKey.js? Looks like easiest way to keep consistency. And things like greenkeeper.io could be used to check compatibility with upcoming React versions.

ayrton commented 8 years ago

@princed is on my list of things to figure out, most likely I will do this tomorrow, together with what's left on the roadmap

ayrton commented 8 years ago

FYI @princed this tweet pretty much sums up why this is not a good idea.

princed commented 8 years ago

Of course it could be moved, there's greenkeeper.io for that in my opinion :)

ayrton commented 8 years ago

My major concern is that I'm not 100% sure how this would work when publishing this library, considering react is a peer dependency and react is stubbed out, so that the user can include whatever react version they prefer.

If you have any ideas, feel free to open a PR after I've merged in this one, happy to do what's best for the project.