
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@wordpress/keycodes
Advanced tools
Keycodes utilities for WordPress. Used to check for keyboard events across browsers/operating systems.
Keycodes utilities for WordPress, used to check the key pressed in events like onKeyDown. Contains keycodes constants for keyboard keys like DOWN, UP, ENTER, etc.
Install the module
npm install @wordpress/keycodes --save
Check which key was used in an onKeyDown event:
import { DOWN, ENTER } from '@wordpress/keycodes';
// [...]
onKeyDown( event ) {
const { keyCode } = event;
if ( keyCode === DOWN ) {
alert( 'You pressed the down arrow!' );
} else if ( keyCode === ENTER ) {
alert( 'You pressed the enter key!' );
} else {
alert( 'You pressed another key.' );
}
}

FAQs
Keycodes utilities for WordPress. Used to check for keyboard events across browsers/operating systems.
The npm package @wordpress/keycodes receives a total of 115,198 weekly downloads. As such, @wordpress/keycodes popularity was classified as popular.
We found that @wordpress/keycodes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 23 open source maintainers 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.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.