gasolin / webbymouse

Turn your mobile phone into Air Mouse and touchpad with full web technology
MIT License
76 stars 17 forks source link

Air Mouse and touchpad with full web technology.

Build Status Dependency Status

Install

Unzip downloaded zip, tap to open it. Then you have a desktop with mouse server enabled.

Imgur

Open your mobile browser by scanning the QRCode or enter the URL, then you are able to control your desktop via browser.

Features

Touchpad mode (Mouse Control)

Air mouse mode (Motion Control)

Tap menu then choose Motion Control, then you can wave your mobile device to control the mouse.

Present mode

Tap menu then choose Presentation Control, then you can control the presentation by:

Passcode protection

On desktop and on client side browser, tap menu then choose Passcode to enter same string on prompt, then you can make sure the mouse is only accessible by you. (The passcode is not remembered and should re-entered when you restart the desktop next time)

How to Contribute

Patch is welcome. If you feel Webby Mouse is useful, please spread the word on social media!

Technology used

Setup

Get required packages

$ npm install

Which will also run bower install to install related client side libraries into public/vendor folder.

Then run

$ node server.js

To host the mouse server on desktop.

Code structure

The server side server.js manage the mouse position change, the client side send position offset to server.

The desktop side desktop.html includes server.js and provide the connection instruction and system tray.

In client side index.html, just call emitMouse to update the mouse position.

Build for Desktop

You need install node-webkit-builder first

$ npm install nw-builder -g

You have to check nw.js website and use same io.js version as nw.js did.

$ nvm install iojs-1.2.0
$ nvm use iojs

To build a smaller package, we only need install essential libraries for production. Clone a new repository and run following commands:

$ npm install --production
$ nwbuild -p osx64 webbymouse -v 0.12.3

Due to underlying robotjs mouse library, currently MacOS is the only support platform.