{"_id":"@accessible/use-key","_rev":"3-a3c06ae0a95b5557f1b299aad8f86375","name":"@accessible/use-key","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@accessible/use-key","version":"1.0.0","homepage":"https://github.com/accessible-ui/use-keycode#readme","repository":{"type":"git","url":"https://github.com/accessible-ui/use-keycode.git"},"bugs":{"url":"https://github.com/accessible-ui/use-keycode/issues"},"author":{"name":"Jared Lunde","email":"jared.lunde@gmail.com","url":"https://jaredLunde.com"},"license":"MIT","description":"A React hook for handling `keydown` events on elements","keywords":["react","react hook","use key","usekey","keydown hook","use keydown","usekeydown"],"main":"dist/main/index.js","module":"dist/module/index.js","unpkg":"dist/umd/use-key.js","source":"src/index.tsx","types":"types/index.d.ts","exports":{".":{"browser":"./dist/module/index.js","import":"./dist/esm/index.mjs","require":"./dist/main/index.js","umd":"./dist/umd/use-key.js","source":"./src/index.tsx","types":"./types/index.d.ts","default":"./dist/main/index.js"},"./package.json":"./package.json","./":"./"},"sideEffects":false,"scripts":{"build":"lundle build --umd-case camel","check-types":"lundle check-types","dev":"lundle build -f module,cjs -w","format":"prettier --write \"{,!(node_modules|dist|coverage)/**/}*.{ts,tsx,js,jsx,md,yml,json}\"","lint":"eslint . --ext .ts,.tsx","prepublishOnly":"cli-confirm \"Did you run 'yarn release' first? (y/N)\"","prerelease":"npm run validate && npm run build","release":"git add . && standard-version -a","test":"jest","validate":"lundle check-types && npm run lint && jest --coverage"},"husky":{"hooks":{"pre-commit":"lundle check-types && lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"lint-staged":{"**/*.{ts,tsx,js,jsx}":["eslint","prettier --write"],"**/*.{md,yml,json}":["prettier --write"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"eslintConfig":{"extends":["lunde"]},"eslintIgnore":["node_modules","coverage","dist","/types","test","*.config.js"],"jest":{"moduleDirectories":["node_modules","src","test"],"testMatch":["<rootDir>/src/**/?(*.)test.{ts,tsx}"],"collectCoverageFrom":["**/src/**/*.{ts,tsx}"],"setupFilesAfterEnv":["./test/setup.js"],"snapshotResolver":"./test/resolve-snapshot.js","globals":{"__DEV__":true}},"prettier":{"semi":false,"singleQuote":true,"jsxSingleQuote":true,"bracketSpacing":false},"devDependencies":{"@commitlint/cli":"latest","@commitlint/config-conventional":"latest","@testing-library/jest-dom":"latest","@testing-library/react":"latest","@testing-library/react-hooks":"latest","@testing-library/user-event":"latest","@types/jest":"latest","@types/react":"latest","@types/react-dom":"latest","babel-jest":"latest","cli-confirm":"latest","cz-conventional-changelog":"latest","eslint":"latest","eslint-config-lunde":"latest","husky":"latest","jest":"latest","lint-staged":"latest","lundle":"latest","prettier":"latest","react":"latest","react-dom":"latest","react-test-renderer":"latest","standard-version":"latest","typescript":"latest"},"dependencies":{"@react-hook/event":"^1.2.2"},"peerDependencies":{"react":">=16.8"},"licenseText":"MIT License\n\nCopyright (c) 2019 Jared Lunde\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"@accessible/use-key@1.0.0","dist":{"shasum":"717bca70c04808430c9553d747815dfd05caaf34","integrity":"sha512-mcY3q7jApaHjYyP4B7c7jAragNV0wPvUTUnuvSWIegOTPfCBX4cQuGQgyqbFLBylpysXohrTR3J9+vDH/JmENA==","tarball":"https://registry.npmjs.org/@accessible/use-key/-/use-key-1.0.0.tgz","fileCount":25,"unpackedSize":31107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA+upCRA9TVsSAnZWagAAodoP/ReAjtzmSssvMEP+ydD3\n1xNnHK/j3Yg9nfM/2iqC3w2+aucAzXdDAJCl/Y4M6DdMlP/oytv99xBvqeH5\nWZpYMf9LUWDL3fzzhjg7Dnz7kNxHmIz2JBSIIZu9wrK0PrP/0JokA9xo+rsp\nPn2rYJiPE4mnQxT32dpqbHFJlZYVnasaYKLdoBSxGrKTd2z4B1KQg+c5Dkee\nsabDQBtu8SHYGGXrGcGKTSnpM59KEREkaUTq/LIkp3Dvkzzy0qubUURIHDrM\nbtO327J7gGjBog/pkgb0Z0S5Kl7o+qkO/1uDczJ76t+7bjeB6GnOBR+CQaJe\nf6jcfC4PCOI02PFX5/sbtz7ylB2wbW0MBzqM2HJiWUxLOg7RcZxsPW1sNUKK\nbIX+zPflLjCscr5+5as95lQ+qkBYk7hrK67Im1V98zfv+u7Qvqj5A6l8FhfS\nUTO2UXEgp4eMIqllKtIF0WmfP+lMETywQQvhWoDNwJPnzwxN7he1W2sSoKg2\nP9WacdJ5MjTkWbvsYaO1BigFfn3b2gqJkBt49o/ZQ7sXkbQ5YqSA27Vy+5Qe\nJhOe4a1icuprYBDSvTH9jVu9dPJG3a9RLJJNb2tWCewItu+T0msOnTfqYPNd\nyvmSZxbAuozIiJviLTr5JAk43zjWyazz+V+Ps2jnswTidDBvWBaS1uEQ/QwW\n2Che\r\n=JZS9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPw2gxNQ1alcRRuqkGp3A2CGNnjhf+H/g+cwYu5HpFnAiBP3Tm3SanwbkJ5Zq4jM+Ih3s2EafPD+hZO6WeSeVXsTA=="}]},"maintainers":[{"name":"jaredlunde","email":"jared.lunde@gmail.com"}],"_npmUser":{"name":"jaredlunde","email":"jared.lunde@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-key_1.0.0_1594092456691_0.7506526642357232"},"_hasShrinkwrap":false},"1.0.1":{"name":"@accessible/use-key","version":"1.0.1","homepage":"https://github.com/accessible-ui/use-keycode#readme","repository":{"type":"git","url":"https://github.com/accessible-ui/use-keycode.git"},"bugs":{"url":"https://github.com/accessible-ui/use-keycode/issues"},"author":{"name":"Jared Lunde","email":"jared.lunde@gmail.com","url":"https://jaredLunde.com"},"license":"MIT","description":"A React hook for handling `keydown` events on elements","keywords":["react","react hook","use key","usekey","keydown hook","use keydown","usekeydown"],"main":"dist/main/index.js","module":"dist/module/index.js","unpkg":"dist/umd/use-key.js","source":"src/index.tsx","types":"types/index.d.ts","exports":{".":{"browser":"./dist/module/index.js","import":"./dist/esm/index.mjs","require":"./dist/main/index.js","umd":"./dist/umd/use-key.js","source":"./src/index.tsx","types":"./types/index.d.ts","default":"./dist/main/index.js"},"./package.json":"./package.json","./":"./"},"sideEffects":false,"scripts":{"build":"lundle build --umd-case camel","check-types":"lundle check-types","dev":"lundle build -f module,cjs -w","format":"prettier --write \"{,!(node_modules|dist|coverage)/**/}*.{ts,tsx,js,jsx,md,yml,json}\"","lint":"eslint . --ext .ts,.tsx","prepublishOnly":"cli-confirm \"Did you run 'yarn release' first? (y/N)\"","prerelease":"npm run validate && npm run build","release":"git add . && standard-version -a","test":"jest","validate":"lundle check-types && npm run lint && jest --coverage"},"husky":{"hooks":{"pre-commit":"lundle check-types && lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"lint-staged":{"**/*.{ts,tsx,js,jsx}":["eslint","prettier --write"],"**/*.{md,yml,json}":["prettier --write"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"eslintConfig":{"extends":["lunde"]},"eslintIgnore":["node_modules","coverage","dist","/types","test","*.config.js"],"jest":{"moduleDirectories":["node_modules","src","test"],"testMatch":["<rootDir>/src/**/?(*.)test.{ts,tsx}"],"collectCoverageFrom":["**/src/**/*.{ts,tsx}"],"setupFilesAfterEnv":["./test/setup.js"],"snapshotResolver":"./test/resolve-snapshot.js","globals":{"__DEV__":true}},"prettier":{"semi":false,"singleQuote":true,"jsxSingleQuote":true,"bracketSpacing":false},"devDependencies":{"@commitlint/cli":"latest","@commitlint/config-conventional":"latest","@testing-library/jest-dom":"latest","@testing-library/react":"latest","@testing-library/react-hooks":"latest","@testing-library/user-event":"latest","@types/jest":"latest","@types/react":"latest","@types/react-dom":"latest","babel-jest":"latest","cli-confirm":"latest","cz-conventional-changelog":"latest","eslint":"latest","eslint-config-lunde":"latest","husky":"latest","jest":"latest","lint-staged":"latest","lundle":"latest","prettier":"latest","react":"latest","react-dom":"latest","react-test-renderer":"latest","standard-version":"latest","typescript":"latest"},"dependencies":{"@react-hook/event":"^1.2.2"},"peerDependencies":{"react":">=16.8"},"licenseText":"MIT License\n\nCopyright (c) 2019 Jared Lunde\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"@accessible/use-key@1.0.1","dist":{"shasum":"0bea4318c3ec769d5710dd7dab79b36a209514f3","integrity":"sha512-ftWkwy4BNCP6s0Ce5zndjeL/ohQ9n/R5oIa4K3dQP9cj0iVnOrHAjN+7nNECMooVBVypCr6zGPryh9eJN4ZZZA==","tarball":"https://registry.npmjs.org/@accessible/use-key/-/use-key-1.0.1.tgz","fileCount":25,"unpackedSize":33907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBRioCRA9TVsSAnZWagAAFkcP/iJ9+v6sTBcqihT6FS27\nPIgXeVJreIH1mJw+gix6qE5mr6IxGiXcR8iCk3wcMXNjYWSftetQK/58HD8A\n4kJlBAZWyt3V+/M2N00ymrtZmGAwmdjQLSS/1894SkgXUxQiKhX6gPtO4hJI\nV+PaTMFW6iuJON9IP6toyrrDmu6VPj0wevwP2bdNw8KslP4Inxfa5X0eRP4I\nDZ9Fz2R55Lua5d4chpNPg5mmAL2b2PHCAqtOS/hcM+u8KbfcG7fp0csGXFYa\nos/iaCxLfegYdVnMJGRxij/Y1Bn/ZHUFb8T/SdmqENduHVRgBC+qIwUTPWrS\nBEvB/Cypyx55utiQVJ/WCmSL/vpsq2PKI3Qzpu/8Vpd2ArHwW2Tpz1XDHF6C\nKmnSOYnDuebgecwOSeTdTXtPg5/6Kw/8A6d7VcGehj6vnt1CeosDW4n6ll0f\no8n25xm3N5dSbzCUbempOYlmMz4dyzWf7rwuKsBTXmuteU4se5sK+/Dm2C7H\nItW6F1q/AGJPD1Xr+KTokCz9IUQl6lxgjed/xN+yHTaT6o76NIe6SgpKAkEx\nT8qd3Ew6mijRPDpXYk/rEzZbKaTG8MMEudr6SpgFC04lq7v1e1cRbZscSRLW\nWTVNpO/cYt0IR8kRspKROrWTl7Chjg1nAJ5WxxG7oju6XO5HqnCDOqwTD085\nlhwr\r\n=RHjc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFb6G+aq160AIcpQZl3bdDigYAORSz/MPmd7dUMwrgJlAiAiGdsYQj4l9D4YeW6CBHq3JVRV4rbjxnbs9nt+FffEbw=="}]},"maintainers":[{"name":"jaredlunde","email":"jared.lunde@gmail.com"}],"_npmUser":{"name":"jaredlunde","email":"jared.lunde@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-key_1.0.1_1594169511574_0.26551668257488736"},"_hasShrinkwrap":false},"1.0.2":{"name":"@accessible/use-key","version":"1.0.2","homepage":"https://github.com/accessible-ui/use-keycode#readme","repository":{"type":"git","url":"git+https://github.com/accessible-ui/use-keycode.git"},"bugs":{"url":"https://github.com/accessible-ui/use-keycode/issues"},"author":{"name":"Jared Lunde","email":"jared.lunde@gmail.com","url":"https://jaredLunde.com"},"license":"MIT","description":"A React hook for handling `keydown` events on elements","keywords":["react","react hook","use key","usekey","keydown hook","use keydown","usekeydown"],"main":"dist/main/index.js","module":"dist/module/index.js","unpkg":"dist/umd/use-key.js","source":"src/index.tsx","types":"types/index.d.ts","exports":{".":{"browser":"./dist/module/index.js","import":"./dist/esm/index.mjs","require":"./dist/main/index.js","umd":"./dist/umd/use-key.js","source":"./src/index.tsx","types":"./types/index.d.ts","default":"./dist/main/index.js"},"./package.json":"./package.json","./":"./"},"sideEffects":false,"scripts":{"build":"lundle build --umd-case camel","check-types":"lundle check-types","dev":"lundle build -f module,cjs -w","format":"prettier --write \"{,!(node_modules|dist|coverage)/**/}*.{ts,tsx,js,jsx,md,yml,json}\"","lint":"eslint . --ext .ts,.tsx","prepublishOnly":"cli-confirm \"Did you run 'yarn release' first? (y/N)\"","prerelease":"npm run validate && npm run build","release":"git add . && standard-version -a","test":"jest","validate":"lundle check-types && npm run lint && jest --coverage"},"husky":{"hooks":{"pre-commit":"lundle check-types && lint-staged","commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"lint-staged":{"**/*.{ts,tsx,js,jsx}":["eslint","prettier --write"],"**/*.{md,yml,json}":["prettier --write"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"eslintConfig":{"extends":["lunde"]},"eslintIgnore":["node_modules","coverage","dist","/types","test","*.config.js"],"jest":{"moduleDirectories":["node_modules","src","test"],"testMatch":["<rootDir>/src/**/?(*.)test.{ts,tsx}"],"collectCoverageFrom":["**/src/**/*.{ts,tsx}"],"setupFilesAfterEnv":["./test/setup.js"],"snapshotResolver":"./test/resolve-snapshot.js","globals":{"__DEV__":true}},"prettier":{"semi":false,"singleQuote":true,"jsxSingleQuote":true,"bracketSpacing":false},"devDependencies":{"@commitlint/cli":"latest","@commitlint/config-conventional":"latest","@testing-library/jest-dom":"latest","@testing-library/react":"latest","@testing-library/react-hooks":"latest","@testing-library/user-event":"latest","@types/jest":"latest","@types/react":"latest","@types/react-dom":"latest","babel-jest":"latest","cli-confirm":"latest","cz-conventional-changelog":"latest","eslint":"latest","eslint-config-lunde":"latest","husky":"latest","jest":"latest","lint-staged":"latest","lundle":"latest","prettier":"latest","react":"latest","react-dom":"latest","react-test-renderer":"latest","standard-version":"latest","typescript":"latest"},"dependencies":{"@react-hook/event":"^1.2.2"},"peerDependencies":{"react":">=16.8"},"gitHead":"c28972bdb7ec587410d1dd5399f8d60393dff4b7","_id":"@accessible/use-key@1.0.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-vB4VsgUXBJRPTu9CbB2YJADL2DJzzoNzXtPBrV00/oIbEiCKZGHcDpdlRVqU4W/LT/q4hY2hEBf3LvQiCMg85w==","shasum":"65e90d38a5ead75c5e82f72b200485e73c503f9f","tarball":"https://registry.npmjs.org/@accessible/use-key/-/use-key-1.0.2.tgz","fileCount":17,"unpackedSize":34212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBT3vCRA9TVsSAnZWagAAbqsP/j/Y4iFU5YXjRKJE7j3h\nRMYREJJr+iH41CQwmlr3Xdq/+xJPJ+EF1TZ1u83lN+78kWWxkXJ0iCdN8QdT\nYQ3d0UwSqPP+1hRcQTFILZYdClZ8Y2yAjhcDLlVDZZ8jD7DitjXS9KgtcCY3\n/Ja2HCswv0KrYZ2+8P8zXkRtdG2AM7P2izDros6pei4h4VGSkbE7qnWYichZ\n5dpxXFhEv/MZaPHhPcCePH7skSJQjF1T5UuJvRITybX/tNTWfBSZrYXIwr5j\niwt/HHpDX700jN/mFzCyPsxfRKI9u5NxexUDrXHRLZGObvB47k1eVoSrHYIt\ngomAtTREsWMh7p/of3WhrNHfCM9ZRLujNMIJAZRJxp9RjO+ITwaLiqR5JHtR\nOL57pg7vn1xTgmsvimkeny9V+3Ck68vUJFZ1IcTS6nT5+wMGTrQZXjeIxEix\nuzQU1n7J0rPDM9G8nX9IcXYCGLCFG9Zbfzj1fvOzrslypsVQABWFbBKeVqBO\ndrO37LABpfam7tv1VrhNJghNEzlordlApX4tSICnZA+nm9pHbrE0hkEyYe44\nx9W5gApBRzHpf3Zumvdmh2ONgejfv95MW48N0XXYQym5sLp2pR4Sk7S2cDWa\nPOcqxurvQEf44aCnNaNdbao3TZYVR4AATtc7Rdfq9H5SeX73B+rlpIuhcEgg\ndM9f\r\n=koFM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFckKXCAWrSOP7QqxfIhyKJevbA7dsfRq1tOt9CJ61vuAiBcu4L8JeD3Fgjm9rrAjI3svpAD3VVsY4FRcmfJkvGuWw=="}]},"maintainers":[{"name":"jaredlunde","email":"jared.lunde@gmail.com"}],"_npmUser":{"name":"jaredlunde","email":"jared.lunde@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-key_1.0.2_1594179054566_0.5690074777553253"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-07T03:27:36.454Z","1.0.0":"2020-07-07T03:27:36.850Z","modified":"2022-04-04T11:07:10.580Z","1.0.1":"2020-07-08T00:51:51.731Z","1.0.2":"2020-07-08T03:30:54.721Z"},"maintainers":[{"name":"jaredlunde","email":"jared.lunde@gmail.com"}],"description":"A React hook for handling `keydown` events on elements","homepage":"https://github.com/accessible-ui/use-keycode#readme","keywords":["react","react hook","use key","usekey","keydown hook","use keydown","usekeydown"],"repository":{"type":"git","url":"git+https://github.com/accessible-ui/use-keycode.git"},"author":{"name":"Jared Lunde","email":"jared.lunde@gmail.com","url":"https://jaredLunde.com"},"bugs":{"url":"https://github.com/accessible-ui/use-keycode/issues"},"license":"MIT","readme":"<hr>\n<div align=\"center\">\n  <h1 align=\"center\">\n    useKey()\n  </h1>\n</div>\n\n<p align=\"center\">\n  <a href=\"https://bundlephobia.com/result?p=@accessible/use-key\">\n    <img alt=\"Bundlephobia\" src=\"https://img.shields.io/bundlephobia/minzip/@accessible/use-key?style=for-the-badge&labelColor=24292e\">\n  </a>\n  <a aria-label=\"Code coverage report\" href=\"https://codecov.io/gh/accessible-ui/use-key\">\n    <img alt=\"Code coverage\" src=\"https://img.shields.io/codecov/c/gh/accessible-ui/use-key?style=for-the-badge&labelColor=24292e\">\n  </a>\n  <a aria-label=\"Build status\" href=\"https://travis-ci.org/accessible-ui/use-key\">\n    <img alt=\"Build status\" src=\"https://img.shields.io/travis/accessible-ui/use-key?style=for-the-badge&labelColor=24292e\">\n  </a>\n  <a aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/@accessible/use-key\">\n    <img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/@accessible/use-key?style=for-the-badge&labelColor=24292e\">\n  </a>\n  <a aria-label=\"License\" href=\"https://jaredlunde.mit-license.org/\">\n    <img alt=\"MIT License\" src=\"https://img.shields.io/npm/l/@accessible/use-key?style=for-the-badge&labelColor=24292e\">\n  </a>\n</p>\n\n<pre align=\"center\">npm i @accessible/use-key</pre>\n<hr>\n\nA React hook for handling `keydown` events on specific `event.key` values. It also\nnormalizes non-standard `event.key` values from IE to their modern equivalents.\n\n## Quick Start\n\n```jsx harmony\nimport * as React from 'react'\nimport useKey from '@accessible/use-key'\n\nconst Component = () => {\n  const ref = React.useRef(null)\n\n  // Listens to keydown events on the `ref` above\n  useKey(ref, {\n    // Logs event when the Escape key is pressed\n    Escape: console.log,\n    // Logs \"Key was pressed: Enter\" to the console when Enter is pressed\n    Enter: (event) => console.log('Key was pressed:', event.key),\n  })\n\n  // Listens to keydown events on the window\n  useKey(window, {\n    // Logs event when the Escape key is pressed\n    Escape: console.log,\n    // Logs \"Key was pressed: Enter\" to the console when Enter is pressed\n    Enter: (event) => console.log('Key was pressed:', event.key),\n  })\n\n  return <div ref={ref} />\n}\n```\n\n## API\n\n### useKey(target, handlers)\n\n#### Arguments\n\n| Argument | Type                                                                                     | Required? | Description                                                                                                                    |\n| -------- | ---------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| target   | <code>React.RefObject&lt;T&gt; &#124; T &#124; Window &#124; Document &#124; null</code> | Yes       | A React ref, element, `window`, or `document` to add the key listener to                                                       |\n| handlers | `Record<string, (event?: KeyboardEvent) => any>`                                         | Yes       | A mapping with keys matching the `event.key` string you want to listen on. The value for each key should be an event listener. |\n\n#### Returns `void`\n\n## LICENSE\n\nMIT\n","readmeFilename":"README.md"}