
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
keycode-to-codes
Advanced tools
Library that returns a list of KeyboardEvent codes based the input keyCode
Library that returns a list of possible KeyboardEvent codes based the input keyCode. Useful for replacing a missing KeyboardEvent.code property.
Example:
13 -> ["Enter", "NumpadEnter"]
32 -> ["Space"]
97 -> ["KeyA"]
Add the script to your project through a package manager:
$ npm i keycode-to-codes
or
$ yarn add keycode-to-codes
Alternatively you can also import the script found in the releases section on GitHub directly. If you choose this option you won't need to use imports going forward - everything will all be available to you automatically.
<script src="keycode-to-codes.min.js"></script>
Or include through a public CDN:
<script src="https://unpkg.com/keycode-to-codes@2/dist/keycode-to-codes.min.js"></script>
import keyCodeToCodes from 'keycode-to-codes';
// OR
const keyCodeToCodes = require('keycode-to-codes');
window.addEventListener('keypress', (event) => {
const codes = keyCodeToCodes(event.keyCode);
});
FAQs
Library that returns a list of KeyboardEvent codes based the input keyCode
The npm package keycode-to-codes receives a total of 0 weekly downloads. As such, keycode-to-codes popularity was classified as not popular.
We found that keycode-to-codes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.