@olympicangel/mouse-events
v1.0.0
Published
Simple module that adds Global mouse events using C# binary ()[DWindows only)
Downloads
6
Maintainers
Readme
MouseDetect
Simple module that adds Global mouse events using C# binary (Windows only)
Installation
npm install @olympicangel/mouse-events
Usage
var MouseEvents = require('@olympicangel/mouse-events');
MouseEvents.on("move", console.log) // will output every mouse movement, outputs something like: {action:"move",cords:[0,0]}
Documentation
Not much here really - its straight forward..
Events:
A list of all events that can be registred(used with "on" function)
move
Triggres when mouse moves.wheel
Triggres when scrolling wheel (not when clicking).left_down
Triggres when left btn press starts.left_up
Triggres when left btn gets released.right_down
Triggres when right btn press starts.right_up
Triggres when right btn gets released.any
Triggres for every event listed above (originaly used for activity detetion or global hook function).
Functions:
on(event,Function)
Registers afunction
forevent
- event names taken from Events.remove(event,Function)
Removes a registredfunction
from Events type.
Why & How
Why windows?
This module supports only windows as I use windows (sorry tho)..
How does it works?
The detection is using C# & windows dll hooks - outputing it to node.
Why not other modules?
There might be other modules that do thats BUT i didnt manges to find any, found only Linux related or old/outdated ones..