
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
node-cursor
Advanced tools
A node module to get information about the Windows mouse cursor, change its position and simulate clicks.
yarn add node-cursor
or
npm install node-cursor
import {getCursorPosition, setCursorPosition, sendCursorEvent, cursorEvents} from "node-cursor";
getCursorPosition();
//Return: { x: 0, y: 0 }
setCursorPosition({
x: 0,
y: 0
});
//Send mouse click at 0, 0
sendCursorEvent({
event: cursorEvents.LEFT_DOWN,
data: 0,
x: 0,
y: 0
});
sendCursorEvent({
event: cursorEvents.LEFT_UP,
data: 0,
x: 0,
y: 0
});
//Scroll wheel
sendCursorEvent({
event: cursorEvents.WHEEL,
data: 120, //amount of wheel movement
x: 0,
y: 0
});
const NodeCursor = require("node-cursor");
NodeCursor.getCursorPosition();
//Return: { x: 0, y: 0 }
NodeCursor.setCursorPosition({
x: 0,
y: 0
});
//Send mouse click at 0, 0
NodeCursor.sendCursorEvent({
event: NodeCursor.cursorEvents.LEFT_DOWN,
data: 0,
x: 0,
y: 0
});
NodeCursor.sendCursorEvent({
event: NodeCursor.cursorEvents.LEFT_UP,
data: 0,
x: 0,
y: 0
});
//Scroll wheel
NodeCursor.sendCursorEvent({
event: NodeCursor.cursorEvents.WHEEL,
data: 120, //amount of wheel movement
x: 0,
y: 0
});
import {cursorEvents} from "node-cursor";
cursorEvents.LEFT_DOWN //0x0002
cursorEvents.LEFT_UP //0x0004
cursorEvents.RIGHT_DOWN //0x0008
cursorEvents.RIGHT_UP //0x0010
cursorEvents.MIDDLE_DOWN //0x0020
cursorEvents.MIDDLE_UP //0x0040
cursorEvents.WHEEL //0x0800
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
Windows mouse cursor utils.
The npm package node-cursor receives a total of 0 weekly downloads. As such, node-cursor popularity was classified as not popular.
We found that node-cursor 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.