
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A high-performance, cross-platform global keyboard event listener for Node.js, written in Rust.
A high-performance, cross-platform global keyboard event listener for Node.js, written in Rust.
rustcatch allows your Node.js application to listen for keyboard events from any application across the entire operating system, not just the focused terminal window.
rustcatch?| OS | Supported | Notes |
|---|---|---|
| Windows | ✅ | Works out of the box. |
| macOS | ✅ | Requires Accessibility permissions for the terminal/app in settings. |
| Linux (X11) | ✅ | Requires libxdo-dev, libxtst-dev, and other X11 development libs. |
# To install from GitHub (until published on NPM)
npm install GITHUB_USERNAME/rustcatch
(Replace GITHUB_USERNAME with the actual GitHub username.)
Here is a simple example of how to use rustcatch to log key presses and releases.
const rustcatch = require('rustcatch');
// Add a listener for the 'keydown' event
rustcatch.on('keydown', (event) => {
console.log('Key Down:', event);
// Example event: { type: 'keydown', key: 'KeyA' }
});
// Add a listener for the 'keyup' event
rustcatch.on('keyup', (event) => {
console.log('Key Up: ', event);
// Example event: { type: 'keyup', key: 'KeyA' }
});
// Start the global listener
try {
rustcatch.start();
console.log('Global listener started successfully.');
console.log('Press any key (even in other windows)...');
} catch (error) {
console.error('Failed to start listener:', error);
}
// Stop the listener after 30 seconds
setTimeout(() => {
if (rustcatch.isRunning) {
rustcatch.stop();
console.log('Global listener stopped.');
}
}, 30000);
The rustcatch module is an instance of EventEmitter.
rustcatch.start()Starts the global keyboard listener. It will begin emitting keydown and keyup events.
rustcatch.stop()Stops the global keyboard listener. No more events will be emitted.
rustcatch.isRunningboolean (Read-only)true if the listener is currently active, otherwise false.on('keydown', callback)callback(event)
event <Object>
type <string> - Always 'keydown'.key <string> - A string representation of the key that was pressed (e.g., 'KeyA', 'Space', 'ControlLeft').on('keyup', callback)callback(event)
event <Object>
type <string> - Always 'keyup'.key <string> - A string representation of the key that was released.Contributions are welcome! Please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A high-performance, cross-platform global keyboard event listener for Node.js, written in Rust.
The npm package rustcatch receives a total of 2 weekly downloads. As such, rustcatch popularity was classified as not popular.
We found that rustcatch demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.