# node-mouse

> handle mouse events from /dev/input/[mouse[0-9]+|mice]

Latest version **0.0.2** (published 2015-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-mouse
pnpm add node-mouse
yarn add node-mouse
bun add node-mouse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-10-02 |
| First published | 2015-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Javier Infante |
| Maintainers | jabiinfante |
| Keywords | mouse, events, handle |

## Links

- npm: https://www.npmjs.com/package/node-mouse
- Repository: https://github.com/irontec/node-mouse
- Homepage: https://github.com/irontec/node-mouse#readme
- Issues: https://github.com/irontec/node-mouse/issues
- npm.io page: https://npm.io/package/node-mouse

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-10-02
- 0.0.1 — 2015-10-02

## README

# node-mouse

A quick adaptation mouse event handler for nodejs.

Most of the work comes from:

* [Read Linux mouse(s) in node.js](https://gist.github.com/bfncs/2020943) (Marc Loehe)
* [Node-keyboard](https://github.com/Bornholm/node-keyboard)
* [Read a Linux Joystick](https://github.com/nodebits/linux-joystick) (Tim Caswell)



# Install
```shell
    npm install node-mouse --save
```

# Usage
```javascript
var Mouse = require("./mouse.js");

var m = new Mouse();

m.on("mousedown",function(event) {
    console.log(event);
});

m.on("mouseup",function(event) {
    console.log(event);
});

// same as mouseup, but fired after
m.on("click",function(event) {
    console.log(event);
});


m.on("mousemove", function(event) {
    console.log(event);
});
```


# Licence
MIT

---
_Source: https://npm.io/package/node-mouse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
