# pointing

> An open-source cross-platform library to get raw events from pointing devices and master transfer functions

Latest version **0.0.5** (published 2016-03-04) · GPL license · 0 weekly downloads

## Install

```sh
npm install pointing
pnpm add pointing
yarn add pointing
bun add pointing
```

## 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.5 |
| Published | 2016-03-04 |
| First published | 2016-02-23 |
| Weekly downloads | 0 |
| License | GPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Maintainers | izzat |

## Links

- npm: https://www.npmjs.com/package/pointing
- Homepage: http://libpointing.org
- npm.io page: https://npm.io/package/pointing

## Dependencies (1)

- [nan](https://npm.io/package/nan.md) ^2.1.0

## Recent versions

- 0.0.5 (latest) — 2016-03-04
- 0.0.4 — 2016-02-23

## README

# pointing

---

[Libpointing](http://libpointing.org) Node.js bindings

Libpointing is an open-source cross-platform library to get raw events from pointing devices and master transfer functions.

## Description

---

Libpointing is an open-source cross-platform library that provides direct access to HID pointing devices and supports the design of pointing transfer functions.

## Installation

---

* Install [libpointing](http://libpointing.org)
* npm install pointing

Note that, `pointing` with npm can be installed only on Mac OS and Linux.

## Example

---

	var pointing = require('pointing');

	if (process.argv.length < 5)
		console.log("Usage: node", process.argv[1], "[inputdeviceURI [outputdeviceURI [transferfunctionURI]]]")

	global.input = pointing.PointingDevice((process.argv[2]) ? process.argv[2] : "any:")
	var output = pointing.DisplayDevice((process.argv[3]) ? process.argv[3] : "any:");
	var tFunc = pointing.TransferFunction((process.argv[4]) ? process.argv[4] : "system:", input, output);

	input.setPointingCallback(function(timestamp, dx, dy, buttons) {
		var pixels = tFunc.applyi(dx, dy, timestamp);
		console.log(timestamp, dx, dy, buttons, " -> ", pixels.dx, pixels.dy);
	});

	var manager = pointing.PointingDeviceManager().addDeviceUpdateCallback(
		function(deviceDescriptor, wasAdded)
		{
			console.log(deviceDescriptor, wasAdded);
		}
	);
	var acc = pointing.SystemPointerAcceleration();
	console.log("Current acceleration for mouse:", acc.get());

	setTimeout(function() {
		console.log("Finished");
	}, 100000);

## License

---

This software may be used and distributed according to the terms of the GNU General Public License version 2 or any later version.

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