{"action":"created","comment":{"url":"https://api.github.com/repos/ayrton/react-key-handler/pulls/comments/55140486","id":55140486,"diff_hunk":"@@ -67,9 +87,18 @@ describe('KeyHandler', () => {\n \n     expect(handler.calledOnce).to.equal(true);\n   });\n+\n+  it('prioritizes key value over code/name', () => {\n+    const handler = sinon.spy();\n+    mount(<KeyHandler keyCode={M} keyValue={ARROW_LEFT} onKeyHandle={handler} />);","path":"test/components/key-handler.test.js","position":48,"original_position":48,"commit_id":"80bad0e2442b3ca836901a416707186bf7672c65","original_commit_id":"80bad0e2442b3ca836901a416707186bf7672c65","user":{"login":"ayrton","id":440926,"avatar_url":"https://avatars.githubusercontent.com/u/440926?v=3","gravatar_id":"","url":"https://api.github.com/users/ayrton","html_url":"https://github.com/ayrton","followers_url":"https://api.github.com/users/ayrton/followers","following_url":"https://api.github.com/users/ayrton/following{/other_user}","gists_url":"https://api.github.com/users/ayrton/gists{/gist_id}","starred_url":"https://api.github.com/users/ayrton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayrton/subscriptions","organizations_url":"https://api.github.com/users/ayrton/orgs","repos_url":"https://api.github.com/users/ayrton/repos","events_url":"https://api.github.com/users/ayrton/events{/privacy}","received_events_url":"https://api.github.com/users/ayrton/received_events","type":"User","site_admin":false},"body":"Might be worth to add `keyName=\"m\"` here too","created_at":"2016-03-06T14:41:08Z","updated_at":"2016-03-06T14:41:08Z","html_url":"https://github.com/ayrton/react-key-handler/pull/10#discussion_r55140486","pull_request_url":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/ayrton/react-key-handler/pulls/comments/55140486"},"html":{"href":"https://github.com/ayrton/react-key-handler/pull/10#discussion_r55140486"},"pull_request":{"href":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10","id":61832107,"html_url":"https://github.com/ayrton/react-key-handler/pull/10","diff_url":"https://github.com/ayrton/react-key-handler/pull/10.diff","patch_url":"https://github.com/ayrton/react-key-handler/pull/10.patch","issue_url":"https://api.github.com/repos/ayrton/react-key-handler/issues/10","number":10,"state":"open","locked":false,"title":"Add W3C KeyboardEvent.key values support.","user":{"login":"leocavalcante","id":183722,"avatar_url":"https://avatars.githubusercontent.com/u/183722?v=3","gravatar_id":"","url":"https://api.github.com/users/leocavalcante","html_url":"https://github.com/leocavalcante","followers_url":"https://api.github.com/users/leocavalcante/followers","following_url":"https://api.github.com/users/leocavalcante/following{/other_user}","gists_url":"https://api.github.com/users/leocavalcante/gists{/gist_id}","starred_url":"https://api.github.com/users/leocavalcante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leocavalcante/subscriptions","organizations_url":"https://api.github.com/users/leocavalcante/orgs","repos_url":"https://api.github.com/users/leocavalcante/repos","events_url":"https://api.github.com/users/leocavalcante/events{/privacy}","received_events_url":"https://api.github.com/users/leocavalcante/received_events","type":"User","site_admin":false},"body":"As discussed at #7 \r\n\r\n[`KeyboardEvent.keyCode`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) is deprecated, also MDN recommends to avoid it for new projects in favor of [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\r\n\r\nThis PR is a result of following this recommendations without dropping the support for `keyCode` since not every browser has implemented the new standard yet.\r\n\r\nThe usage of `keyValue` instead of `keyId` as discussed at #7 is to match an [ubiquitous terminology with current standards](https://www.w3.org/TR/uievents/#glossary-key-value).\r\n\r\nNow, despite letter case, the arrow keys values are the only difference I notice from [`keycodes`](https://www.npmjs.com/package/keycodes) naming to actual `key` values so `keyNameVals` might seams dummy, but it allows to map any another differences.\r\n\r\nHope it helps!\r\nCheers","created_at":"2016-03-06T02:58:43Z","updated_at":"2016-03-06T14:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06d44d9cf53ba78e28884ecd056c5db566c7eca0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10/commits","review_comments_url":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10/comments","review_comment_url":"https://api.github.com/repos/ayrton/react-key-handler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ayrton/react-key-handler/issues/10/comments","statuses_url":"https://api.github.com/repos/ayrton/react-key-handler/statuses/80bad0e2442b3ca836901a416707186bf7672c65","head":{"label":"leocavalcante:key-values","ref":"key-values","sha":"80bad0e2442b3ca836901a416707186bf7672c65","user":{"login":"leocavalcante","id":183722,"avatar_url":"https://avatars.githubusercontent.com/u/183722?v=3","gravatar_id":"","url":"https://api.github.com/users/leocavalcante","html_url":"https://github.com/leocavalcante","followers_url":"https://api.github.com/users/leocavalcante/followers","following_url":"https://api.github.com/users/leocavalcante/following{/other_user}","gists_url":"https://api.github.com/users/leocavalcante/gists{/gist_id}","starred_url":"https://api.github.com/users/leocavalcante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leocavalcante/subscriptions","organizations_url":"https://api.github.com/users/leocavalcante/orgs","repos_url":"https://api.github.com/users/leocavalcante/repos","events_url":"https://api.github.com/users/leocavalcante/events{/privacy}","received_events_url":"https://api.github.com/users/leocavalcante/received_events","type":"User","site_admin":false},"repo":{"id":53162607,"name":"react-key-handler","full_name":"leocavalcante/react-key-handler","owner":{"login":"leocavalcante","id":183722,"avatar_url":"https://avatars.githubusercontent.com/u/183722?v=3","gravatar_id":"","url":"https://api.github.com/users/leocavalcante","html_url":"https://github.com/leocavalcante","followers_url":"https://api.github.com/users/leocavalcante/followers","following_url":"https://api.github.com/users/leocavalcante/following{/other_user}","gists_url":"https://api.github.com/users/leocavalcante/gists{/gist_id}","starred_url":"https://api.github.com/users/leocavalcante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leocavalcante/subscriptions","organizations_url":"https://api.github.com/users/leocavalcante/orgs","repos_url":"https://api.github.com/users/leocavalcante/repos","events_url":"https://api.github.com/users/leocavalcante/events{/privacy}","received_events_url":"https://api.github.com/users/leocavalcante/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leocavalcante/react-key-handler","description":"React component to handle key events :key:","fork":true,"url":"https://api.github.com/repos/leocavalcante/react-key-handler","forks_url":"https://api.github.com/repos/leocavalcante/react-key-handler/forks","keys_url":"https://api.github.com/repos/leocavalcante/react-key-handler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leocavalcante/react-key-handler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leocavalcante/react-key-handler/teams","hooks_url":"https://api.github.com/repos/leocavalcante/react-key-handler/hooks","issue_events_url":"https://api.github.com/repos/leocavalcante/react-key-handler/issues/events{/number}","events_url":"https://api.github.com/repos/leocavalcante/react-key-handler/events","assignees_url":"https://api.github.com/repos/leocavalcante/react-key-handler/assignees{/user}","branches_url":"https://api.github.com/repos/leocavalcante/react-key-handler/branches{/branch}","tags_url":"https://api.github.com/repos/leocavalcante/react-key-handler/tags","blobs_url":"https://api.github.com/repos/leocavalcante/react-key-handler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leocavalcante/react-key-handler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leocavalcante/react-key-handler/git/refs{/sha}","trees_url":"https://api.github.com/repos/leocavalcante/react-key-handler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leocavalcante/react-key-handler/statuses/{sha}","languages_url":"https://api.github.com/repos/leocavalcante/react-key-handler/languages","stargazers_url":"https://api.github.com/repos/leocavalcante/react-key-handler/stargazers","contributors_url":"https://api.github.com/repos/leocavalcante/react-key-handler/contributors","subscribers_url":"https://api.github.com/repos/leocavalcante/react-key-handler/subscribers","subscription_url":"https://api.github.com/repos/leocavalcante/react-key-handler/subscription","commits_url":"https://api.github.com/repos/leocavalcante/react-key-handler/commits{/sha}","git_commits_url":"https://api.github.com/repos/leocavalcante/react-key-handler/git/commits{/sha}","comments_url":"https://api.github.com/repos/leocavalcante/react-key-handler/comments{/number}","issue_comment_url":"https://api.github.com/repos/leocavalcante/react-key-handler/issues/comments{/number}","contents_url":"https://api.github.com/repos/leocavalcante/react-key-handler/contents/{+path}","compare_url":"https://api.github.com/repos/leocavalcante/react-key-handler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leocavalcante/react-key-handler/merges","archive_url":"https://api.github.com/repos/leocavalcante/react-key-handler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leocavalcante/react-key-handler/downloads","issues_url":"https://api.github.com/repos/leocavalcante/react-key-handler/issues{/number}","pulls_url":"https://api.github.com/repos/leocavalcante/react-key-handler/pulls{/number}","milestones_url":"https://api.github.com/repos/leocavalcante/react-key-handler/milestones{/number}","notifications_url":"https://api.github.com/repos/leocavalcante/react-key-handler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leocavalcante/react-key-handler/labels{/name}","releases_url":"https://api.github.com/repos/leocavalcante/react-key-handler/releases{/id}","deployments_url":"https://api.github.com/repos/leocavalcante/react-key-handler/deployments","created_at":"2016-03-04T20:11:54Z","updated_at":"2016-03-04T20:11:55Z","pushed_at":"2016-03-06T06:04:41Z","git_url":"git://github.com/leocavalcante/react-key-handler.git","ssh_url":"git@github.com:leocavalcante/react-key-handler.git","clone_url":"https://github.com/leocavalcante/react-key-handler.git","svn_url":"https://github.com/leocavalcante/react-key-handler","homepage":"http://ayrton.be/react-key-handler","size":221,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ayrton:master","ref":"master","sha":"1747d79a3483d73237924e834101b6e8544c74b9","user":{"login":"ayrton","id":440926,"avatar_url":"https://avatars.githubusercontent.com/u/440926?v=3","gravatar_id":"","url":"https://api.github.com/users/ayrton","html_url":"https://github.com/ayrton","followers_url":"https://api.github.com/users/ayrton/followers","following_url":"https://api.github.com/users/ayrton/following{/other_user}","gists_url":"https://api.github.com/users/ayrton/gists{/gist_id}","starred_url":"https://api.github.com/users/ayrton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayrton/subscriptions","organizations_url":"https://api.github.com/users/ayrton/orgs","repos_url":"https://api.github.com/users/ayrton/repos","events_url":"https://api.github.com/users/ayrton/events{/privacy}","received_events_url":"https://api.github.com/users/ayrton/received_events","type":"User","site_admin":false},"repo":{"id":52687184,"name":"react-key-handler","full_name":"ayrton/react-key-handler","owner":{"login":"ayrton","id":440926,"avatar_url":"https://avatars.githubusercontent.com/u/440926?v=3","gravatar_id":"","url":"https://api.github.com/users/ayrton","html_url":"https://github.com/ayrton","followers_url":"https://api.github.com/users/ayrton/followers","following_url":"https://api.github.com/users/ayrton/following{/other_user}","gists_url":"https://api.github.com/users/ayrton/gists{/gist_id}","starred_url":"https://api.github.com/users/ayrton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayrton/subscriptions","organizations_url":"https://api.github.com/users/ayrton/orgs","repos_url":"https://api.github.com/users/ayrton/repos","events_url":"https://api.github.com/users/ayrton/events{/privacy}","received_events_url":"https://api.github.com/users/ayrton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ayrton/react-key-handler","description":"React component to handle key events :key:","fork":false,"url":"https://api.github.com/repos/ayrton/react-key-handler","forks_url":"https://api.github.com/repos/ayrton/react-key-handler/forks","keys_url":"https://api.github.com/repos/ayrton/react-key-handler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayrton/react-key-handler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayrton/react-key-handler/teams","hooks_url":"https://api.github.com/repos/ayrton/react-key-handler/hooks","issue_events_url":"https://api.github.com/repos/ayrton/react-key-handler/issues/events{/number}","events_url":"https://api.github.com/repos/ayrton/react-key-handler/events","assignees_url":"https://api.github.com/repos/ayrton/react-key-handler/assignees{/user}","branches_url":"https://api.github.com/repos/ayrton/react-key-handler/branches{/branch}","tags_url":"https://api.github.com/repos/ayrton/react-key-handler/tags","blobs_url":"https://api.github.com/repos/ayrton/react-key-handler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayrton/react-key-handler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayrton/react-key-handler/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayrton/react-key-handler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayrton/react-key-handler/statuses/{sha}","languages_url":"https://api.github.com/repos/ayrton/react-key-handler/languages","stargazers_url":"https://api.github.com/repos/ayrton/react-key-handler/stargazers","contributors_url":"https://api.github.com/repos/ayrton/react-key-handler/contributors","subscribers_url":"https://api.github.com/repos/ayrton/react-key-handler/subscribers","subscription_url":"https://api.github.com/repos/ayrton/react-key-handler/subscription","commits_url":"https://api.github.com/repos/ayrton/react-key-handler/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayrton/react-key-handler/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayrton/react-key-handler/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayrton/react-key-handler/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayrton/react-key-handler/contents/{+path}","compare_url":"https://api.github.com/repos/ayrton/react-key-handler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayrton/react-key-handler/merges","archive_url":"https://api.github.com/repos/ayrton/react-key-handler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayrton/react-key-handler/downloads","issues_url":"https://api.github.com/repos/ayrton/react-key-handler/issues{/number}","pulls_url":"https://api.github.com/repos/ayrton/react-key-handler/pulls{/number}","milestones_url":"https://api.github.com/repos/ayrton/react-key-handler/milestones{/number}","notifications_url":"https://api.github.com/repos/ayrton/react-key-handler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayrton/react-key-handler/labels{/name}","releases_url":"https://api.github.com/repos/ayrton/react-key-handler/releases{/id}","deployments_url":"https://api.github.com/repos/ayrton/react-key-handler/deployments","created_at":"2016-02-27T20:27:48Z","updated_at":"2016-03-06T05:22:34Z","pushed_at":"2016-03-06T06:04:42Z","git_url":"git://github.com/ayrton/react-key-handler.git","ssh_url":"git@github.com:ayrton/react-key-handler.git","clone_url":"https://github.com/ayrton/react-key-handler.git","svn_url":"https://github.com/ayrton/react-key-handler","homepage":"http://ayrton.be/react-key-handler","size":216,"stargazers_count":36,"watchers_count":36,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10"},"html":{"href":"https://github.com/ayrton/react-key-handler/pull/10"},"issue":{"href":"https://api.github.com/repos/ayrton/react-key-handler/issues/10"},"comments":{"href":"https://api.github.com/repos/ayrton/react-key-handler/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/ayrton/react-key-handler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ayrton/react-key-handler/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/ayrton/react-key-handler/statuses/80bad0e2442b3ca836901a416707186bf7672c65"}}}}