{"_id":"usekeyboard-react","_rev":"41-778f68e6e41cc520bc0e6b7cb196c205","name":"usekeyboard-react","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"usekeyboard-react","version":"1.0.0","keywords":[],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.0.0","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"dist":{"shasum":"dcbaa1eb4a028a6fb430e151e131258f7c9a1fb4","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.0.0.tgz","fileCount":9,"integrity":"sha512-cwxraYjfoBFyDZfxxZ5c6vUAeN8mfWC+i7+4SyccKIqE1zYtCILEXdi/tuhFeXbxEtkUwjb3rZdfulzOp62zHA==","signatures":[{"sig":"MEQCICgAxLN9Xe8cbos41aWKe7K9SPwBczVURVWNavMGF4gEAiBQptK2z7y/dAYttkom+8n7/A5cGBwv7Jg3D6ifbasTHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4905},"main":"build/index.js","types":"build/index.d.ts","gitHead":"03069f84f680fe8258a37416f98584183e4fd78e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.0.0_1715568343617_0.2737491311151399","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"usekeyboard-react","version":"1.0.1","keywords":[],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.0.1","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"dist":{"shasum":"f54e46867c107d41858fb690ed96aa57a07b613b","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.0.1.tgz","fileCount":12,"integrity":"sha512-QCgwrj9EaAa3eSymgowfenQWrVYWM8HQIrK/O1dfnoN7ZZIYh1kfHzAV8Q4LpMu8tbKoLXUPFfWfNJFQEJRZag==","signatures":[{"sig":"MEUCIAx6AuYVCt3d7TRjVlmbjD/eUfrUOrk2ORxl4YPNPAztAiEA3Nb9QHw5fCE5mcUOguWZdhTnxMcTWQHx9Yt1J9fBab4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5173},"main":"build/index.js","types":"build/index.d.ts","gitHead":"03069f84f680fe8258a37416f98584183e4fd78e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.0.1_1715568774404_0.2661356411764386","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"usekeyboard-react","version":"1.0.2","keywords":[],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.0.2","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"dist":{"shasum":"0d0a93112fb9d913f0e80c9356d745c06656e970","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.0.2.tgz","fileCount":12,"integrity":"sha512-uMmlFLEzxgNTGcNEOFFOKgZY5F3XKTreiaF2O7otSwEziYHIBmIcRJlUPCpfbMbIDI1RL2IsDhakaGkvA2tH7w==","signatures":[{"sig":"MEYCIQD6RHL2QPjcrba5p9ThWq6lHDesq1nR0xRYhJsDEaRXOwIhAP4XuihvkgvSwGFQMkFTI0dM1/po8fX1Jv1w2U5m1UPe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5209},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"03069f84f680fe8258a37416f98584183e4fd78e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.0.2_1715569161094_0.26202534020853796","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"usekeyboard-react","version":"1.0.3","keywords":[],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.0.3","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"dist":{"shasum":"af6de33c22ee34aadb1a4b45a5751c92852a085e","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.0.3.tgz","fileCount":12,"integrity":"sha512-scj8co/45mgeFpnDF0iIOuh0PT8aL6PkeoT+Y+0WdeyBrOYQZLDs2GpFKrzw1j0d3idQBsUm/sDyq4jBbZHStw==","signatures":[{"sig":"MEUCIHB4+rsibJIk8N0HNhhYVvf8HsWfaprROkhaFAXTSM8TAiEAkufIM263LdKrIyeH01ngyaJyV5GdWY0R+kIlZVWjpZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10381},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"39441e0f232f20170f464b5a21781053f4c2ba62","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.0.3_1715656170061_0.05310132941372081","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"usekeyboard-react","version":"1.0.5","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.0.5","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"97078ca0691843f27d193a6abd0f97bbb27f8311","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.0.5.tgz","fileCount":12,"integrity":"sha512-ufp5ekCXbwqZ7wdXRcf1gaRxT2ojWRk5MRQAML/PEkHiGW+ATCxAlcUc/3H3ahwyhVZpyMwespUTY2OKF1f3/g==","signatures":[{"sig":"MEYCIQCbDJOU49rN8SlcCo1dLD/2klEb3uC8bEO0lB4uH4NbIQIhAOy92U0n79aDjhzo5yRLkqcqiMyTwGOhCo5C/nfZcuTL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10591},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"047f64f5b8b825b0eb9b39a2bda9ead1ccfb0028","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.0.5_1715656429104_0.8440530253044696","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"usekeyboard-react","version":"1.1.1","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.1.1","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"95a222c1fb505a69526d09f3a94c936f5b6d57ac","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.1.1.tgz","fileCount":13,"integrity":"sha512-eTDQVv6/NflT2Di+G7G0Qnxe9yTxObBkoWbtDiTR6F7TO/GjFG7QEL9kxMdMKsCcpIcNu6Vee93hWbtWWrUXGQ==","signatures":[{"sig":"MEQCIEEt6Kx7nL4Oo1SzMqWhVxFs0LMSX1OZdIhWYkoSScPfAiAb4DLfGh0V77ELtkevkEiXn2HFPs8iSzS2gTOkndQIhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17324},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"634579326422c392639637261e60c56d0aed85d4","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.1.1_1715920117557_0.7833892284143951","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"usekeyboard-react","version":"1.1.2","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.1.2","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"d02b4b4e01a78a7f0b75a05009abb46acbeb8ad2","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.1.2.tgz","fileCount":13,"integrity":"sha512-VG7YDuX0MtxA2B2ov7u6MBB8ZT0ZsKbgMgZJBn3IfYqZTXdFPAvd4XeRL/XCt7GcDW3b/kCORrGU8kMbUSGqUg==","signatures":[{"sig":"MEUCIC0gXYYwijzxTqzIJz7LrfVqeAouarl7sBGoELIs/k/8AiEAj6UtHaw9wnqi4S1VMHppNLrSmPfwNm9YW4Q7VXDYsHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19580},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2f5eb178374ccecd7d4655ff001c0daf073cf065","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.2"},"peerDependencies":{"react":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.1.2_1716132421732_0.5146434500877659","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"usekeyboard-react","version":"1.3.0","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.3.0","homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"84d6b4cb61038623a6e283d0ff469362bb822c7a","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.3.0.tgz","fileCount":7,"integrity":"sha512-ogASa6gWI+66f5cRuC0l1rFrpusnHT9gdU8zoxMjJ6iWvgeq9442sXVkZVHVLTxx5b7eI7voe9prE1uOHYe6mQ==","signatures":[{"sig":"MEUCIQC9kwDjK4iRac1BRdWg/fDiSmgBNJw8FupxyPo3//46KwIgPXSYgYAUnNxw7q/qKhGiN+eAjTatUYMDCEDEb5UdXRs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14021},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a66942ef52cdb7018dfd4e9a67ccaaf5ae044c00","scripts":{"dev":"vite","test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","react":"^18.3.1","eslint":"^8.57.0","react-dom":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.1","@typescript-eslint/parser":"^7.13.1","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-react-refresh":"^0.4.7","@typescript-eslint/eslint-plugin":"^7.13.1"},"peerDependencies":{"react":">=18.3.1","react-dom":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.3.0_1719187504435_0.05342660215703421","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"usekeyboard-react","version":"1.3.1","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.3.1","homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"dcb3f061534a7b453d2baf5f67df070428038d62","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.3.1.tgz","fileCount":7,"integrity":"sha512-0jjvNxB8RzeLXkV+oyTBbqj8D3CXZWw2jhShp7qTsHw14Qyp3f4zEZkmqlM+QeVCu07V+VQe7ALV2pqpxIaecQ==","signatures":[{"sig":"MEUCIQCs2EHs4XMZbKq8p174Xshq3NnAWq+rrmeJf1/8ymjGQwIgEGOcBvrx6q93F+wWT/IEsA1jdFHOO7YsizVP3AFcOhc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14677},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7eb6863bc0678daacb87f38b99d7bf88d6ca586e","scripts":{"dev":"vite","test":"echo \"Error: no test specified\" && exit 1","build":"npx tsc -p ."},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.5.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","react":"^18.3.1","eslint":"^8.57.0","react-dom":"^18.3.1","typescript":"^5.4.5","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.1","@typescript-eslint/parser":"^7.13.1","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-react-refresh":"^0.4.7","@typescript-eslint/eslint-plugin":"^7.13.1"},"peerDependencies":{"react":">=18.3.1","react-dom":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.3.1_1719188322155_0.9637876103531846","host":"s3://npm-registry-packages"}},"1.5.1":{"name":"usekeyboard-react","version":"1.5.1","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.5.1","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"8d58c08cfbf66ca86cc4c2fc639b8bc2fa94b8a2","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.5.1.tgz","fileCount":12,"integrity":"sha512-Efeqvgsm0NeWJA2ooJj6d9qmlTpu+7GvK2FmzC0xiTqNGOdkY21WAupXg4UUxQgm1/Yho0Whay/SkFJkpbdqxQ==","signatures":[{"sig":"MEYCIQDAAneqBF5CPfw4uBfew8Kz/wclhGz7B8406O5M/LFF3wIhANS0Ttz5SF+KiSSAyk7pgz0hYA6Et0s6uN3il/P7cM9L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16869},"main":"dist/usekeyboard-react.umd.js","type":"module","types":"dist/types/usekeyboard-react.es.d.ts","module":"dist/usekeyboard-react.es.js","gitHead":"7eb6863bc0678daacb87f38b99d7bf88d6ca586e","scripts":{"dev":"vite","build":"vite build","storybook":"storybook dev -p 6006","build-storybook":"storybook build"},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.9.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"react":">=18.3.1","react-dom":">=18.3.1","@types/react":"^18.3.3","@types/react-dom":"^18.3.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","eslint":"^8.57.0","storybook":"^8.4.7","typescript":"^5.4.5","@storybook/test":"^8.4.7","vite-plugin-dts":"^4.4.0","@storybook/react":"^8.4.7","@storybook/blocks":"^8.4.7","vite-tsconfig-paths":"^5.1.4","@vitejs/plugin-react":"^4.3.1","@storybook/react-vite":"^8.4.7","@storybook/addon-links":"^8.4.7","eslint-plugin-storybook":"^0.11.2","@chromatic-com/storybook":"^3.2.3","@storybook/addon-actions":"^8.4.7","@typescript-eslint/parser":"^7.13.1","eslint-plugin-react-hooks":"^4.6.2","@storybook/addon-essentials":"^8.4.7","@storybook/addon-onboarding":"^8.4.7","eslint-plugin-react-refresh":"^0.4.7","@storybook/addon-interactions":"^8.4.7","@typescript-eslint/eslint-plugin":"^7.13.1"},"peerDependencies":{"react":">=18.3.1","react-dom":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.5.1_1736119148852_0.3455168541253981","host":"s3://npm-registry-packages-npm-production"}},"1.5.2":{"name":"usekeyboard-react","version":"1.5.2","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.5.2","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"3ae8e077b8d0af29b162d370c9cbf340e9b1882f","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.5.2.tgz","fileCount":13,"integrity":"sha512-BxQcuUVfuAnM6LvB2b4gvx5jH3dfUlg7e8c/KovRE+9ZKV4PU9fe6uR6Y1i1fHdxbZ1nRZTaL4L9WS5l0QMezA==","signatures":[{"sig":"MEUCIEdSlzsPhdrshOzZfsMpgfEax05B3bnbeG3349zOLZ+lAiEA1Id2FwChNyfrlre1vsIPa4XsU2dmYqDg/7BlxbLvzTg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17244},"main":"dist/usekeyboard-react.umd.js","type":"module","types":"dist/types/usekeyboard-react.es.d.ts","module":"dist/usekeyboard-react.es.js","gitHead":"4ef97d201f8088f41921070021f74919f7a5def1","scripts":{"dev":"vite","test":"npx jest --watchAll --verbose","build":"vite build","storybook":"storybook dev -p 6006","build-storybook":"storybook build"},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.9.0","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"react":">=18.3.1","react-dom":">=18.3.1","@types/jest":"^29.5.13","@types/node":"^20.10.6","@types/react":"^18.3.3","@types/react-dom":"^18.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","vite":"^5.3.1","eslint":"^8.57.0","ts-jest":"^29.2.5","storybook":"^8.4.7","typescript":"^5.4.5","@storybook/test":"^8.4.7","vite-plugin-dts":"^4.4.0","@storybook/react":"^8.4.7","@storybook/blocks":"^8.4.7","vite-tsconfig-paths":"^5.1.4","@testing-library/dom":"^10.4.0","@vitejs/plugin-react":"^4.3.1","@storybook/react-vite":"^8.4.7","@storybook/addon-links":"^8.4.7","@testing-library/react":"^16.0.1","jest-environment-jsdom":"^29.7.0","eslint-plugin-storybook":"^0.11.2","@chromatic-com/storybook":"^3.2.3","@storybook/addon-actions":"^8.4.7","@testing-library/jest-dom":"^6.6.2","@typescript-eslint/parser":"^7.13.1","eslint-plugin-react-hooks":"^4.6.2","@storybook/addon-essentials":"^8.4.7","@storybook/addon-onboarding":"^8.4.7","@testing-library/user-event":"^14.5.2","eslint-plugin-react-refresh":"^0.4.7","@storybook/addon-interactions":"^8.4.7","@typescript-eslint/eslint-plugin":"^7.13.1"},"peerDependencies":{"react":">=18.3.1","react-dom":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.5.2_1736124206009_0.16835111714437523","host":"s3://npm-registry-packages-npm-production"}},"1.5.3":{"name":"usekeyboard-react","version":"1.5.3","keywords":["keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","_id":"usekeyboard-react@1.5.3","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"homepage":"https://github.com/DiegoLibonati/UseKeyBoard#readme","bugs":{"url":"https://github.com/DiegoLibonati/UseKeyBoard/issues"},"dist":{"shasum":"757647e7a694a1a7ec169edc304ad2e5b5179512","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-1.5.3.tgz","fileCount":13,"integrity":"sha512-CCGrmN1zcdrZf5VphDN7YpAFqTEgMeFL7wxP2gL83exZZH/OrL2nSe15PVx6DKIOCEM7+KW7FvPNT/dL54lcZA==","signatures":[{"sig":"MEQCIB4Grruf3dS5xCoWKMuBIcLWD+ckfrev251axfow0GayAiB1mDgcgkH8Q9sP663YVModb68I73jaR8U9nOE6YlXZhw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17274},"main":"dist/usekeyboard-react.umd.js","type":"module","types":"dist/types/usekeyboard-react.es.d.ts","module":"dist/usekeyboard-react.es.js","gitHead":"3edd9a265a5f573ed80af28d0b4f4e506ab365c2","scripts":{"dev":"vite","test":"jest --watchAll --verbose","build":"vite build","storybook":"storybook dev -p 6006","build-storybook":"storybook build"},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"repository":{"url":"git+https://github.com/DiegoLibonati/UseKeyBoard.git","type":"git","directory":"packages/usekeyboard-react"},"_npmVersion":"10.9.3","description":"UseKeyBoard is a React library that executes code depending on the key pressed.","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","vite":"^5.3.1","react":"^18.3.1","eslint":"^8.57.0","ts-jest":"^29.2.5","react-dom":"^18.3.1","storybook":"^8.4.7","typescript":"^5.4.5","@types/jest":"^29.5.13","@types/node":"^20.10.6","@types/react":"^18.3.3","@storybook/test":"^8.4.7","vite-plugin-dts":"^4.4.0","@storybook/react":"^8.4.7","@types/react-dom":"^18.3.0","@storybook/blocks":"^8.4.7","vite-tsconfig-paths":"^5.1.4","@testing-library/dom":"^10.4.0","@vitejs/plugin-react":"^4.3.1","@storybook/react-vite":"^8.4.7","@storybook/addon-links":"^8.4.7","@testing-library/react":"^16.0.1","jest-environment-jsdom":"^29.7.0","eslint-plugin-storybook":"^0.11.2","@chromatic-com/storybook":"^3.2.3","@storybook/addon-actions":"^8.4.7","@testing-library/jest-dom":"^6.6.2","@typescript-eslint/parser":"^7.13.1","eslint-plugin-react-hooks":"^4.6.2","@storybook/addon-essentials":"^8.4.7","@storybook/addon-onboarding":"^8.4.7","@testing-library/user-event":"^14.5.2","eslint-plugin-react-refresh":"^0.4.7","@storybook/addon-interactions":"^8.4.7","@typescript-eslint/eslint-plugin":"^7.13.1"},"peerDependencies":{"react":">=18.3.1","react-dom":">=18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/usekeyboard-react_1.5.3_1756672563779_0.5372343724910582","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"usekeyboard-react","version":"2.0.0","description":"UseKeyboard is a lightweight, fully-typed React hook library for handling keyboard interactions declaratively.","type":"module","main":"dist/usekeyboard-react.umd.js","module":"dist/usekeyboard-react.es.js","types":"dist/types/index.d.ts","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/usekeyboard-react.es.js","require":"./dist/usekeyboard-react.umd.js"}},"sideEffects":false,"keywords":["hooks","keypress","keydown","react","customhook","onKeyPress"],"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DiegoLibonati/use-keyboard.git","directory":"packages/usekeyboard-react"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0"},"devDependencies":{"@eslint/js":"^9.0.0","@storybook/addon-links":"^9.1.6","@storybook/react":"^9.1.6","@storybook/react-vite":"^9.1.10","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.0.1","@testing-library/user-event":"^14.5.2","@types/jest":"^30.0.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.0.2","eslint":"^9.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.5.5","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.7","eslint-plugin-storybook":"^9.1.6","globals":"^15.0.0","husky":"^9.1.7","jest":"^30.3.0","jest-environment-jsdom":"^30.3.0","lint-staged":"^15.2.10","prettier":"^3.4.2","storybook":"^9.1.6","ts-jest":"^29.4.6","typescript":"^5.4.5","typescript-eslint":"^8.0.0","vite":"^7.1.6","vite-plugin-dts":"^4.0.0"},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview","storybook":"storybook dev -p 6006","build-storybook":"storybook build","test":"jest --verbose","test:watch":"jest --watchAll --verbose","test:ci":"jest --ci --verbose","test:coverage":"jest --coverage","lint":"eslint src","lint:fix":"eslint src --fix","lint:all":"eslint src __tests__ --fix","format":"prettier --write \"src/**/*.{ts,tsx,css}\"","format:check":"prettier --check \"src/**/*.{ts,tsx,css}\"","format:all":"prettier --write \"src/**/*.{ts,tsx,css}\" \"__tests__/**/*.{ts,tsx}\"","doctor":"npx react-doctor@latest .","prepare":"husky"},"lint-staged":{"*.{ts,tsx}":["eslint --fix","prettier --write"],"*.{css,json,md}":["prettier --write"]},"_id":"usekeyboard-react@2.0.0","gitHead":"6552a26e9a4417096152ddf4bd74f32bdfd81429","bugs":{"url":"https://github.com/DiegoLibonati/use-keyboard/issues"},"homepage":"https://github.com/DiegoLibonati/use-keyboard#readme","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-FkDqyXMoqDHhENvzG2z/GTXU1iJnm5M59+XsgSR3papv2VGgmMiz4t3GqKzgEO9AwhMzhWkj/WSgBQp/bB1WsA==","shasum":"6bd40cffa8554f98a9d4c43f8b6629863cbd2391","tarball":"https://registry.npmjs.org/usekeyboard-react/-/usekeyboard-react-2.0.0.tgz","fileCount":12,"unpackedSize":36070,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqyH0THVVGnz0/RkIbEHondfQ8dtApCtQi37buWWPiZAIhAKedu3nrKQziY2NQuib/6C2QtrAirz1D66rTvU+NS8MD"}]},"_npmUser":{"name":"die1998","email":"diego.libonati1998@gmail.com"},"directories":{},"maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/usekeyboard-react_2.0.0_1777300737511_0.527757812067569"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-13T02:45:43.616Z","modified":"2026-04-27T14:38:57.789Z","1.0.0":"2024-05-13T02:45:43.779Z","1.0.1":"2024-05-13T02:52:54.548Z","1.0.2":"2024-05-13T02:59:21.251Z","1.0.3":"2024-05-14T03:09:30.195Z","1.0.5":"2024-05-14T03:13:49.268Z","1.1.0":"2024-05-17T04:25:15.031Z","1.1.1":"2024-05-17T04:28:37.730Z","1.1.2":"2024-05-19T15:27:01.883Z","1.2.0":"2024-06-23T23:18:19.890Z","1.2.1":"2024-06-23T23:26:40.578Z","1.2.2":"2024-06-23T23:39:15.678Z","1.2.3":"2024-06-23T23:43:29.113Z","1.2.4":"2024-06-23T23:45:47.703Z","1.2.5":"2024-06-24T00:02:37.007Z","1.2.6":"2024-06-24T00:04:07.043Z","1.3.0":"2024-06-24T00:05:04.616Z","1.3.1":"2024-06-24T00:18:42.312Z","1.4.0":"2025-01-05T23:01:58.789Z","1.4.1":"2025-01-05T23:09:50.290Z","1.4.2":"2025-01-05T23:13:21.115Z","1.4.3":"2025-01-05T23:13:39.823Z","1.4.4":"2025-01-05T23:14:18.715Z","1.5.0":"2025-01-05T23:17:35.157Z","1.5.1":"2025-01-05T23:19:09.017Z","1.5.2":"2025-01-06T00:43:26.232Z","1.5.3":"2025-08-31T20:36:03.953Z","2.0.0":"2026-04-27T14:38:57.666Z"},"bugs":{"url":"https://github.com/DiegoLibonati/use-keyboard/issues"},"author":{"name":"Diego Martin Libonati","email":"diego.libonati1998@gmail.com"},"license":"MIT","homepage":"https://github.com/DiegoLibonati/use-keyboard#readme","keywords":["hooks","keypress","keydown","react","customhook","onKeyPress"],"repository":{"type":"git","url":"git+https://github.com/DiegoLibonati/use-keyboard.git","directory":"packages/usekeyboard-react"},"description":"UseKeyboard is a lightweight, fully-typed React hook library for handling keyboard interactions declaratively.","maintainers":[{"name":"die1998","email":"diego.libonati1998@gmail.com"}],"readme":"<h1 align='center'>\n  UseKeyboard React\n</h1>\n\n<p align='center'>\n  UseKeyboard is a lightweight, fully-typed React hook library for handling keyboard interactions declaratively. Instead of scattering <code>addEventListener</code> calls or <code>onKeyDown</code> handlers across your components, <code>useKeyboard</code> lets you define all your keyboard bindings in one configuration object. You specify which keys to listen for, what function to execute when they are pressed, and optionally restrict matches to specific modifier combinations (Ctrl, Shift, Alt, Meta). The hook supports listening on <code>keydown</code>, <code>keyup</code>, or both events simultaneously, and can be toggled on or off at runtime without unmounting. A <code>debug</code> mode logs each registered key to the console so you can verify your configuration at a glance, and <code>keysLoaded</code> is returned so you can inspect which keys are currently active. The library is zero-dependency (only React as a peer), tree-shakeable, and ships both ESM and UMD builds.\n</p>\n\n### Usage\n\n#### NPM\n\n```bash\nnpm install usekeyboard-react\n```\n\n#### YARN\n\n```bash\nyarn add usekeyboard-react\n```\n\n```jsx\nimport { useState } from \"react\";\nimport { useKeyboard } from \"usekeyboard-react\";\nimport \"./App.css\";\n\nexport const HomePage = (): JSX.Element => {\n  const [count, setCount] = useState<number>(0);\n\n  useKeyboard({\n    config: {\n      keys: [\n        {\n          key: \"Enter\",\n          fn: () => console.log(\"Hi Enter\"),\n        },\n        {\n          key: \"ArrowRight|ArrowLeft\",\n          fn: () => console.log(\"Hi Arrows Right and Left\"),\n        },\n        {\n          key: \"a|b\",\n          fn: (e) => {\n            if (e.key === \"a\") console.log(\"i am A\");\n            if (e.key === \"b\") console.log(\"i am B\");\n          },\n        },\n      ],\n      dependencies: [],\n      debug: true,\n    },\n  });\n\n  return (\n    <main>\n      <h1>Home Page</h1>\n      <p>{count}</p>\n      <button onClick={() => setCount((prev) => prev + 1)}></button>\n    </main>\n  );\n};\n```\n\nIdeally, the hook should be used in the parent component of the current page being rendered. That is to say, we will call it only once based on the page we are rendering. In this case in HomePage as an example.\n\n### Portfolio Link\n\n[`https://www.diegolibonati.com.ar/#/project/use-keyboard`](https://www.diegolibonati.com.ar/#/project/use-keyboard)\n\n### Npm PACKAGE Link\n\n`https://www.npmjs.com/package/usekeyboard-react`\n\n### Props\n\n| Prop           | Description                                                                                                                                                                                                                                  | Type                             | Default     |\n| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ----------- |\n| `keys`         | The set of key bindings to register. Each entry defines the key to listen for, the function to execute, and optional modifier requirements.                                                                                                  | `KeyConfig[]`                    | -           |\n| `dependencies` | Controls when React recreates the internal `onKeyPress` callback via `useCallback`. Pass any values referenced inside your `fn` callbacks that can change between renders. If none of the values change, React reuses the memoized callback. | `React.DependencyList`           | -           |\n| `debug`        | When `true`, logs each registered key to the console on mount so you can verify your configuration.                                                                                                                                          | `boolean`                        | `false`     |\n| `enabled`      | When `false`, no event listeners are attached and no keyboard events are handled. Useful for conditionally disabling keyboard shortcuts without unmounting the component.                                                                    | `boolean`                        | `true`      |\n| `trigger`      | Which DOM event type to listen on. `\"keydown\"` fires while the key is held, `\"keyup\"` fires on release, `\"both\"` registers listeners for both events.                                                                                        | `\"keydown\" \\| \"keyup\" \\| \"both\"` | `\"keydown\"` |\n\n### KeyConfig\n\nEach item in the `keys` array accepts the following fields:\n\n| Field       | Description                                                                                                                        | Type                         | Required |\n| ----------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -------- |\n| `key`       | The key identifier to match (e.g. `\"Enter\"`, `\"ArrowDown\"`). Use `\"\\|\"` as a separator to bind multiple keys to the same function. | `string`                     | ✓        |\n| `fn`        | The function to execute when the key is matched. Receives the native `KeyboardEvent`.                                              | `(e: KeyboardEvent) => void` | ✓        |\n| `modifiers` | Optional modifier keys that must be active for the binding to fire.                                                                | `KeyModifiers`               |          |\n\n### KeyModifiers\n\n| Field   | Description                                             | Type      |\n| ------- | ------------------------------------------------------- | --------- |\n| `ctrl`  | Requires Ctrl to be held (`true`) or not (`false`).     | `boolean` |\n| `shift` | Requires Shift to be held (`true`) or not (`false`).    | `boolean` |\n| `alt`   | Requires Alt to be held (`true`) or not (`false`).      | `boolean` |\n| `meta`  | Requires Meta/Cmd to be held (`true`) or not (`false`). | `boolean` |\n\nExample if debug prop is in true:\n\n![debug-true](./public/loaded.png)\n\n## Multiple Keys with the same Function\n\nIf you want to declare 2 or more keys that have the same function to be executed you can use the string `\"|\"`.\n\nIn this case the keys 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 will execute the command in console: Hi, im a number.\n\n```jsx\nimport { useKeyboard } from \"usekeyboard-react\";\nimport \"./App.css\";\n\nexport const HomePage = (): JSX.Element => {\n  useKeyboard({\n    config: {\n      keys: [\n        {\n          key: \"0|1|2|3|4|5|6|7|8|9\",\n          fn: () => console.log(\"Hi, im a number\"),\n        },\n      ],\n      dependencies: [],\n      debug: true,\n    },\n  });\n\n  return (\n    <main>\n      <h1>Home Page</h1>\n    </main>\n  );\n};\n```\n\n## Using Modifier Keys\n\nYou can require one or more modifier keys to be held for a binding to fire using the `modifiers` field on each key entry.\n\n```jsx\nimport { useKeyboard } from \"usekeyboard-react\";\n\nexport const HomePage = (): JSX.Element => {\n  useKeyboard({\n    config: {\n      keys: [\n        {\n          key: \"s\",\n          modifiers: { ctrl: true },\n          fn: () => console.log(\"Ctrl+S pressed — saving\"),\n        },\n        {\n          key: \"z\",\n          modifiers: { ctrl: true, shift: true },\n          fn: () => console.log(\"Ctrl+Shift+Z pressed — redo\"),\n        },\n        {\n          key: \"k\",\n          modifiers: { meta: true },\n          fn: () => console.log(\"Cmd+K pressed\"),\n        },\n      ],\n      dependencies: [],\n      debug: true,\n    },\n  });\n\n  return <main><h1>Home Page</h1></main>;\n};\n```\n\n## Controlling the Trigger Event\n\nBy default the hook listens on `keydown`. Use `trigger` to change this behaviour.\n\n```jsx\nimport { useKeyboard } from \"usekeyboard-react\";\n\nexport const HomePage = (): JSX.Element => {\n  useKeyboard({\n    config: {\n      keys: [{ key: \"Enter\", fn: () => console.log(\"Enter released\") }],\n      dependencies: [],\n      trigger: \"keyup\",\n    },\n  });\n\n  return <main><h1>Home Page</h1></main>;\n};\n```\n\n## Toggling the Hook at Runtime\n\nUse the `enabled` prop to enable or disable all keyboard listeners without unmounting the component.\n\n```jsx\nimport { useState } from \"react\";\nimport { useKeyboard } from \"usekeyboard-react\";\n\nexport const HomePage = (): JSX.Element => {\n  const [active, setActive] = useState(true);\n\n  useKeyboard({\n    config: {\n      keys: [{ key: \"ArrowUp\", fn: () => console.log(\"Up!\") }],\n      dependencies: [],\n      enabled: active,\n    },\n  });\n\n  return (\n    <main>\n      <h1>Home Page</h1>\n      <button onClick={() => setActive((v) => !v)}>\n        {active ? \"Disable\" : \"Enable\"} shortcuts\n      </button>\n    </main>\n  );\n};\n```\n\n## Using the keyboard event (KeyboardEvent)\n\nWe can also pass inside our execution function the `keydown` event.\n\n`e` refers to Javascript's `KeyboardEvent`.\n\n```jsx\nimport { useKeyboard } from \"usekeyboard-react\";\nimport \"./App.css\";\n\nexport const HomePage = (): JSX.Element => {\n  useKeyboard({\n    config: {\n      keys: [\n        {\n          key: \"a|b\",\n          fn: (e) => {\n            if (e.key === \"a\") console.log(\"i am A\");\n            if (e.key === \"b\") console.log(\"i am B\");\n          },\n        },\n      ],\n      dependencies: [],\n      debug: true,\n    },\n  });\n\n  return (\n    <main>\n      <h1>Home Page</h1>\n    </main>\n  );\n};\n```\n\n### Another Example\n\nHere we are creating actions for when the up, down, right, left, and enter keys on the keyboard are pressed. For each assigned key, a function to execute is assigned for that specific key. Additionally, in the dependencies array, the dependencies for channels and focusedIndex are passed so that the functions inside the keys are updated based on the current state of both dependencies. Finally, debug is set to True so that development messages appear in the console to see information about our hook.\n\n```jsx\nimport { useState } from \"react\";\nimport { useKeyboard } from \"usekeyboard-react\";\n\nconst [focusedIndex, setFocusedIndex] = useState<number>(0);\nuseKeyboard({\n    config: {\n        keys: [\n        {\n            key: \"ArrowRight\",\n            fn: () => {\n                setFocusedIndex((prevIndex) =>\n                    prevIndex === channels?.length! - 1 ? 0 : prevIndex + 1\n                );\n                return;\n            },\n        },\n        {\n            key: \"ArrowLeft\",\n            fn: () => {\n                setFocusedIndex((prevIndex) =>\n                    prevIndex === 0 ? channels?.length! - 1 : prevIndex - 1\n                );\n                return;\n            },\n        },\n\n        {\n            key: \"ArrowUp\",\n            fn: () => {\n                setFocusedIndex((prevIndex) =>\n                    prevIndex === 0 || prevIndex === 1 || prevIndex === 2\n                    ? channels?.length! - 1\n                    : prevIndex - 1\n                );\n                return;\n            },\n        },\n        {\n            key: \"ArrowDown\",\n            fn: () => {\n                setFocusedIndex((prevIndex) =>\n                    prevIndex === channels?.length! - 1 ||\n                    prevIndex === channels?.length! - 2 ||\n                    prevIndex === channels?.length! - 3\n                    ? 0\n                    : prevIndex + 1\n                );\n            },\n        },\n        {\n            key: \"Enter\",\n            fn: () => {\n                handleSetChannel(channels![focusedIndex]);\n                handleNavigateTo(\"/tv\");\n                return;\n            },\n        },\n        ],\n        dependencies: [focusedIndex, channels],\n        debug: true,\n    },\n});\n```\n\n## Best practices or Other uses\n\n### You are free to create new best practices, choose your own style, or put your own touch on it. You are free.\n\nFor better usage, we can create a variable that contains our array of keys, saving space in the code. For example:\n\n```jsx\nconst KEYS = [\n  {\n    key: \"ArrowDown\",\n    fn: () => console.log(\"ArrowDown Pressed\"),\n  },\n  {\n    key: \"Enter\",\n    fn: () => console.log(\"Enter Pressed\"),\n  },\n];\n\nuseKeyboard({\n  config: {\n    keys: KEYS,\n    dependencies: [],\n    debug: true,\n  },\n});\n```\n\nAnother example:\n\n```jsx\nconst handlePressArrowDown = (): void => {\n  console.log(\"ArrowDown Pressed\");\n};\n\nconst KEYS = [\n  {\n    key: \"ArrowDown\",\n    fn: () => handlePressArrowDown(),\n  },\n  {\n    key: \"Enter\",\n    fn: () => console.log(\"Enter Pressed\"),\n  },\n];\n\nuseKeyboard({\n  config: {\n    keys: KEYS,\n    dependencies: [],\n    debug: true,\n  },\n});\n```\n\n## Develop\n\nIf you want to develop or collaborate with this project, please follow point by point:\n\n1. Clone the repository\n2. Navigate to the project folder\n3. Execute: `npm install`\n4. Execute: `npm run storybook` to explore the example component, helper and hook\n\nThe Storybook playground will be available at `http://localhost:6006`\n\n> To run the Vite dev sandbox instead: `npm run dev` → `http://localhost:5173`\n\n## Testing\n\n1. Navigate to the project folder\n2. Execute: `npm test`\n\nFor coverage report:\n\n```bash\nnpm run test:coverage\n```\n\n## Security\n\n### npm audit\n\nCheck for vulnerabilities in dependencies:\n\n```bash\nnpm audit\n```\n\n## Known Issues\n\nNone at the moment.\n","readmeFilename":"README.md"}