https://github.com/krolow/mouse-movement
Track mouse movements (px, mt, km, cm, mm) in nodejs listenin X11 mouse movements
https://github.com/krolow/mouse-movement
Last synced: 2 months ago
JSON representation
Track mouse movements (px, mt, km, cm, mm) in nodejs listenin X11 mouse movements
- Host: GitHub
- URL: https://github.com/krolow/mouse-movement
- Owner: krolow
- Created: 2015-05-31T15:14:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-01T02:17:55.000Z (almost 10 years ago)
- Last Synced: 2025-01-27T06:46:17.744Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mouse-movement
It's just an experimental project for me see how it works to create an addon for nodejs, so do not expect too much, I don't know how code in C or C++ this is just an experiment.
I've coded in Linux and so far is the only operational system that it works...
## Mouse Movement
It tracks the mouse movement and enables to bind listeners using unit conversions:
**Example:**
```javascript
import mouseMovement from 'mouse-movement';//every 100 metters it calls the callback
mouseMovement.every(100).mt(function (x, y) {
//do something with that or not...
});mouseMovement.track(function (x, y) {
//get the current position of mouse
console.log(x, y);
})
```## Todo
* [ ] Add some tests
* [ ] Check performance with multiples listeners and if its affect somehow the js API
* [ ] Improve addon to check what is the best approach to use while(true) and bind multiples calls## License
Licensed under The MIT License
Redistributions of files must retain the above copyright notice.## Author
Vinícius Krolow - krolow[at]gmail.com