w3c-keyname
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -85,2 +85,3 @@ var base = { | ||
var chrome = typeof navigator != "undefined" && /Chrome\/(\d+)/.exec(navigator.userAgent) | ||
var safari = typeof navigator != "undefined" && /Apple Computer/.test(navigator.vendor) | ||
var brokenModifierNames = chrome && +chrome[1] < 57 | ||
@@ -106,3 +107,5 @@ | ||
// they fix https://bugs.chromium.org/p/chromium/issues/detail?id=633838 | ||
var name = ((!brokenModifierNames || !event.ctrlKey && !event.altKey && !event.metaKey) && event.key) || | ||
var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) || | ||
safari && event.shiftKey && event.key && event.key.length == 1 | ||
var name = (!ignoreKey && event.key) || | ||
(event.shiftKey ? shift : base)[event.keyCode] || | ||
@@ -109,0 +112,0 @@ event.key || "Unidentified" |
{ | ||
"name": "w3c-keyname", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Get a KeyboardEvent.key-style string from an event", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4843
117
4