{"name":"w3c-keyname","version":"2.2.7","description":"Get a KeyboardEvent.key-style string from an event","main":"index.cjs","type":"module","exports":{"import":"./index.js","require":"./index.cjs"},"module":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/marijnh/w3c-keyname.git"},"keywords":["browser","key","event","key code"],"author":{"name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","bugs":{"url":"https://github.com/marijnh/w3c-keyname/issues"},"homepage":"https://github.com/marijnh/w3c-keyname#readme","scripts":{"build":"rollup -c","watch":"rollup -c -w","prepare":"npm run build"},"devDependencies":{"rollup":"^1.26.3"},"gitHead":"65e0cd6c773f5ead0da1d300032875e55b4c2ffe","_id":"w3c-keyname@2.2.7","_nodeVersion":"19.7.0","_npmVersion":"9.6.5","dist":{"integrity":"sha512-XB8aa62d4rrVfoZYQaYNy3fy+z4nrfy2ooea3/0BnBzXW0tSdZ+lRgjzBZhk0La0H6h8fVyYCxx/qkQcAIuvfg==","shasum":"e29549e9ac97ac5cb2993c8222994e97922ef377","tarball":"http://registry-npm.ywwl.com/w3c-keyname/download/w3c-keyname-2.2.7.tgz","fileCount":8,"unpackedSize":8556,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpih+I2yG6WH+m2HVgi/rd+RfMTJUG1K438Ewwl006XAIhAKgKy+k08O0ul8tcPXWJ0WmPkofXpMxa7Iaa1Uyn7erm"}],"size":2968,"noattachment":false,"key":"/w3c-keyname/-/w3c-keyname-2.2.7.tgz"},"_npmUser":{"name":"marijn","email":"marijn@haverbeke.berlin"},"directories":{},"maintainers":[{"name":"marijn","email":"marijn@haverbeke.berlin"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/w3c-keyname_2.2.7_1684311444703_0.21940441065720417"},"_hasShrinkwrap":false,"readme":"# W3C keyname\n\nTiny library that exports a function `keyName` that takes a keyboard event and\nreturns a\n[`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)-style\nstring. Will use the actual `key` property of the event if available,\nand fall back to a value synthesized from the `keyCode` otherwise.\n\nProbably often wrong on non-US keyboards, since the correspondence\nbetween a key code and the character it produces when shift is held is\npredicted based on a hard-coded table. Meant as a fallback for\n`KeyboardEvent.key`, not a replacement.\n\nThe lookup tables from key codes (`event.keyCode`) to names are\nexported as `base` (when Shift isn't held) and `shift` (when Shift is\nheld).\n\nLicense: MIT\n","publish_time":1684311444885,"_cnpm_publish_time":1684311444885,"dist-tags":{"latest":"2.2.8"}}