w3c-keyname
Advanced tools
Comparing version 2.2.4 to 2.2.5
@@ -53,4 +53,3 @@ export var base = { | ||
221: "]", | ||
222: "'", | ||
229: "q" | ||
222: "'" | ||
} | ||
@@ -82,4 +81,3 @@ | ||
221: "}", | ||
222: "\"", | ||
229: "Q" | ||
222: "\"" | ||
} | ||
@@ -110,6 +108,5 @@ | ||
export function keyName(event) { | ||
// Don't trust event.key in Chrome when there are modifiers until | ||
// they fix https://bugs.chromium.org/p/chromium/issues/detail?id=633838 | ||
var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) || | ||
(safari || ie) && event.shiftKey && event.key && event.key.length == 1 | ||
(safari || ie) && event.shiftKey && event.key && event.key.length == 1 || | ||
event.key == "Unidentified" | ||
var name = (!ignoreKey && event.key) || | ||
@@ -116,0 +113,0 @@ (event.shiftKey ? shift : base)[event.keyCode] || |
{ | ||
"name": "w3c-keyname", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"description": "Get a KeyboardEvent.key-style string from an event", | ||
@@ -5,0 +5,0 @@ "main": "index.cjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8641
236