{"name":"w3c-keyname","version":"2.2.8","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":"5ea93b04bb62230c7de4165e3a9b5c840f05cd44","_id":"w3c-keyname@2.2.8","_nodeVersion":"19.7.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==","shasum":"7b17c8c6883d4e8b86ac8aba79d39e880f8869c5","tarball":"http://registry-npm.ywwl.com/w3c-keyname/download/w3c-keyname-2.2.8.tgz","fileCount":8,"unpackedSize":8381,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkU6a2Lan2hcG1Ur3z1wD6b0EOFuo9zB/NyndhDaQH6AIhAMH5ziX+id38bdFBSc5P36VMZrCtCIjB7BIj4w4JYLDT"}],"size":2970,"noattachment":false,"key":"/w3c-keyname/-/w3c-keyname-2.2.8.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.8_1686123688371_0.029892351753840973"},"_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":1686123688542,"_cnpm_publish_time":1686123688542,"dist-tags":{"latest":"2.2.8"}}