1.0.0 • Published 3 years ago
@olympicangel/mouse-events v1.0.0
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)
moveTriggres when mouse moves.wheelTriggres when scrolling wheel (not when clicking).left_downTriggres when left btn press starts.left_upTriggres when left btn gets released.right_downTriggres when right btn press starts.right_upTriggres when right btn gets released.anyTriggres for every event listed above (originaly used for activity detetion or global hook function).
Functions:
on(event,Function)Registers afunctionforevent- event names taken from Events.remove(event,Function)Removes a registredfunctionfrom 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..
1.0.0
3 years ago