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

De-dupe alias and code objects. (Fixes #15) #16

Merged
merged 1 commit into from
Feb 3, 2015

Conversation

greim
Copy link
Collaborator

@greim greim commented Feb 3, 2015

Original issue: #15

I think the main back-compat impact is that the mac-specific symbols introduced in #13 are now no longer reverse-mapped into names as the canonical name which seemed like it would break on non-mac platforms. However, those symbols are still present in codes so forward lookup for those symbols should still work.

Moved dupe codes from `codes` to `aliases`. Removed things from
`aliases` that were already in `codes`. Added a test for common
modifier keys.
@timoxley
Copy link
Owner

timoxley commented Feb 3, 2015

Nice one, these are the exact changes I was thinking.

@greim Do you think maybe keycode could be smart and detect mac/win mode and configure reverse-mapping on whatever current platform is?

@timoxley
Copy link
Owner

timoxley commented Feb 3, 2015

cc @yoshuawuyts

@greim
Copy link
Collaborator Author

greim commented Feb 3, 2015

Ideally names would all be platform-agnostic. For example 'meta' would be the canonical name, and aliased to 'windows' and 'command'. https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.metaKey

Unless there are actual conflicting mappings I don't think platform-specific mappings would be very useful for my purposes at least.

@timoxley timoxley merged commit 0e558cf into timoxley:master Feb 3, 2015
@timoxley
Copy link
Owner

timoxley commented Feb 3, 2015

Released in 2.0.0: 1.0.1...2.0.0

While this change is fairly minor, I've bumped major version as someone could be relying on the old names/aliases export.

@timoxley
Copy link
Owner

timoxley commented Feb 3, 2015

Thanks a lot!

@greim
Copy link
Collaborator Author

greim commented Feb 3, 2015

Cool, thanks!

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