{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/issues/14","labels_url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/issues/14/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/issues/14/events","html_url":"https://github.com/PolymerElements/iron-a11y-keys-behavior/issues/14","id":101920402,"number":14,"title":"Normalize key code in event.detail","user":{"login":"shashi","id":25916,"avatar_url":"https://avatars.githubusercontent.com/u/25916?v=3","gravatar_id":"","url":"https://api.github.com/users/shashi","html_url":"https://github.com/shashi","followers_url":"https://api.github.com/users/shashi/followers","following_url":"https://api.github.com/users/shashi/following{/other_user}","gists_url":"https://api.github.com/users/shashi/gists{/gist_id}","starred_url":"https://api.github.com/users/shashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashi/subscriptions","organizations_url":"https://api.github.com/users/shashi/orgs","repos_url":"https://api.github.com/users/shashi/repos","events_url":"https://api.github.com/users/shashi/events{/privacy}","received_events_url":"https://api.github.com/users/shashi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/labels/pending-response","name":"pending-response","color":"333333"}],"state":"open","locked":false,"assignee":{"login":"cdata","id":240083,"avatar_url":"https://avatars.githubusercontent.com/u/240083?v=3","gravatar_id":"","url":"https://api.github.com/users/cdata","html_url":"https://github.com/cdata","followers_url":"https://api.github.com/users/cdata/followers","following_url":"https://api.github.com/users/cdata/following{/other_user}","gists_url":"https://api.github.com/users/cdata/gists{/gist_id}","starred_url":"https://api.github.com/users/cdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdata/subscriptions","organizations_url":"https://api.github.com/users/cdata/orgs","repos_url":"https://api.github.com/users/cdata/repos","events_url":"https://api.github.com/users/cdata/events{/privacy}","received_events_url":"https://api.github.com/users/cdata/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-08-19T15:30:29Z","updated_at":"2015-11-04T05:38:57Z","closed_at":null,"body":"In core-a11y-keys the keyboard event was passed through [`keyboardEventToKey`](https://github.com/Polymer/core-a11y-keys/blob/master/core-a11y-keys.html#L236) function which was very helpful because one didn't have to memorize or look up key codes. event.detail contained exactly the amount of information required. Can we have it back? (can I make a Pull-request or is there a reason this was removed?)"},"comment":{"url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/issues/comments/153581088","html_url":"https://github.com/PolymerElements/iron-a11y-keys-behavior/issues/14#issuecomment-153581088","issue_url":"https://api.github.com/repos/PolymerElements/iron-a11y-keys-behavior/issues/14","id":153581088,"user":{"login":"shashi","id":25916,"avatar_url":"https://avatars.githubusercontent.com/u/25916?v=3","gravatar_id":"","url":"https://api.github.com/users/shashi","html_url":"https://github.com/shashi","followers_url":"https://api.github.com/users/shashi/followers","following_url":"https://api.github.com/users/shashi/following{/other_user}","gists_url":"https://api.github.com/users/shashi/gists{/gist_id}","starred_url":"https://api.github.com/users/shashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashi/subscriptions","organizations_url":"https://api.github.com/users/shashi/orgs","repos_url":"https://api.github.com/users/shashi/repos","events_url":"https://api.github.com/users/shashi/events{/privacy}","received_events_url":"https://api.github.com/users/shashi/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T05:38:57Z","updated_at":"2015-11-04T05:38:57Z","body":"Hello @cdata sorry for the late response. What I did was:\r\n\r\nI added this to the prototype, and then call it from my app under the event handler for `\"keys-pressed\"` event.\r\n```js\r\n      keyboardEventToKey: function (event) {\r\n        return {\r\n          shift: event.shiftKey,\r\n          ctrl: event.ctrlKey,\r\n          meta: event.metaKey,\r\n          alt: event.altKey,\r\n          key: normalizedKeyForEvent(event)\r\n        };\r\n      },\r\n```\r\n\r\nNotice that `normalizedKeyForEvent` is only inside the scope of core-a11y-keys and so adding this to the prototype was necessary."}}