w3c-keyname
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -84,3 +84,4 @@ var base = { | ||
var chrome = typeof navigator != "undefined" && /Chrome\//.test(navigator.userAgent) | ||
var chrome = typeof navigator != "undefined" && /Chrome\/(\d+)/.exec(navigator.userAgent) | ||
var brokenModifierNames = chrome && +chrome[1] < 57 | ||
@@ -105,3 +106,3 @@ // Fill in the digit keys | ||
// they fix https://bugs.chromium.org/p/chromium/issues/detail?id=633838 | ||
var name = ((!chrome || !event.ctrlKey && !event.altKey && !event.metaKey) && event.key) || | ||
var name = ((!brokenModifierNames || !event.ctrlKey && !event.altKey && !event.metaKey) && event.key) || | ||
(event.shiftKey ? shift : base)[event.keyCode] || | ||
@@ -108,0 +109,0 @@ event.key || "Unidentified" |
{ | ||
"name": "w3c-keyname", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Get a KeyboardEvent.key-style string from an event", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4437
109