
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
general-clipboard-listener
Advanced tools
Cross Platform Clipboard listener that detects both text and image update in clipboard
This project is moved to CrossCopy. https://github.com/CrossCopy/clipboard
This repo will be not be maintained and will be archived.
New NPM Package: https://www.npmjs.com/package/@crosscopy/clipboard
A Cross-Platform clipboard listener that listens for both text and image (screenshots).
npm package: https://www.npmjs.com/package/general-clipboard-listener
npm i general-clipboard-listener
It has a very easy to use event-based system.
See demo.ts for a demo.
Run ts-node demo.ts.
import clipboardEventListener from "./index";
clipboardEventListener.on("text", () => {
console.log("Clipboard Text Updated");
});
clipboardEventListener.on("image", () => {
console.log("Clipboard Image Updated");
});
clipboardEventListener.on("open", (data) => {
console.log(data);
});
clipboardEventListener.startListening();
setTimeout(() => {
clipboardEventListener.stopListening();
}, 10000);
It's achieved using child process + stdout.
I took a golang version of the listener from golang-design/clipboard.
When a change is detected, IMAGE_CHANGED or TEXT_CHANGED is printed to stdout.
This library runs compiled go-version clipboard listener using child process and listen to the stdout.
If it sees the keywords in child process's stdout, an event will be emitted.
Run npm run demo to see a demo for 10 sec. Once started, copy some text and screenshot and check the terminal.
Format: process.platform/process.arch
The process here is from nodejs.
Supported platforms can be found in go-clipboard-monitor.
If your nodejs gives different platform or arch, it may not work.
FAQs
Cross Platform Clipboard listener that detects both text and image update in clipboard
We found that general-clipboard-listener 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
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.