Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

w3c-keyname

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

w3c-keyname - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

3

index.js

@@ -91,2 +91,3 @@ var base = {

var mac = typeof navigator != "undefined" && /Mac/.test(navigator.platform)
var ie = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent)
var brokenModifierNames = chrome && (mac || +chrome[1] < 57) || gecko && mac

@@ -113,3 +114,3 @@

var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) ||
safari && event.shiftKey && event.key && event.key.length == 1
(safari || ie) && event.shiftKey && event.key && event.key.length == 1
var name = (!ignoreKey && event.key) ||

@@ -116,0 +117,0 @@ (event.shiftKey ? shift : base)[event.keyCode] ||

{
"name": "w3c-keyname",
"version": "2.1.0",
"version": "2.1.1",
"description": "Get a KeyboardEvent.key-style string from an event",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,4 +12,8 @@ # W3C keyname

predicted based on a hard-coded table. Meant as a fallback for
`KeyboardEvent.name`, not a replacement.
`KeyboardEvent.key`, not a replacement.
The lookup tables from key codes (`event.keyCode`) to names are
exported as `base` (when Shift isn't held) and `shift` (when Shift is
held).
License: MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc