Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #7 from brendankenny/patch-1
Browse files Browse the repository at this point in the history
support artificial keyboard events
  • Loading branch information
dfreedm committed Nov 14, 2014
2 parents c0ec75f + 32cc794 commit c0072cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core-a11y-keys.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@
}

function keyboardEventToKey(ev) {
// fall back from .key, to .keyIdentifier, and then to .keyCode
var normalizedKey = transformKey(ev.key) || transformKeyIdentifier(ev.keyIdentifier) || transformKeyCode(ev.keyCode) || '';
// fall back from .key, to .keyIdentifier, to .keyCode, and then to .detail.key to support artificial keyboard events
var normalizedKey = transformKey(ev.key) || transformKeyIdentifier(ev.keyIdentifier) || transformKeyCode(ev.keyCode) || transformKey(ev.detail.key) || '';
return {
shift: ev.shiftKey,
ctrl: ev.ctrlKey,
Expand Down

0 comments on commit c0072cf

Please sign in to comment.