Streaming mouse events for OS X. Built using osx-mouse module.
npm install osx-mouse-stream
By default the module exposes a readable stream of mouse input events.
var readableMouse = ;var JSONStream = ;;
The above would output an object of the following format.
type: 'move'time: 1431187372523x: 0y: 0
osx-mouse module provides a full list of available event types.
It's also possible to create a writable stream which accepts the described object format, and executes the mouse commands using the macmouse module.
var writableMouse = ;var stream = ;stream;
The command-line tool can be used to record and replay mouse events.
mouse-stream > log
Pipe the file back into the cli.
cat log | mouse-stream --no-output
--no-input options disable the readable and writable part of the cli.
With airpaste it's possible to take control of the mouse on another OS X machine.
mouse-stream | airpaste
airpaste | mouse-stream --no-output