Skip to content

WebMotionMouse allows you to control the cursor and perform clicks on your server using your mobile device. With just a QR code scan, you can adjust sensitivity and navigate seamlessly—all powered by JavaScript!

License

Notifications You must be signed in to change notification settings

cesarleaz/WebMotionMouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖱️ Web Motion Mouse ✨

This project allows you to control your server's mouse via a mobile device using DeviceMotion and touch events through a web interface. It's designed to run on a local server, utilizing socket.io to transmit commands for moving and clicking the mouse on the host machine.

License: MIT

Important

Star Us, You will receive all release notifications from GitHub without any delay ~ ⭐️

🚀 Features

  • Touch and Motion Control: Control the mouse using touch gestures or device movement.
  • Left and Right Clicks: Easily simulate mouse clicks through the web interface.
  • Dynamic QR Code: A QR code is generated to easily connect your mobile device to the server.

🎥 Demo Video:

Watch the demo of this project to see it in action.

🏃 How to Run

Important

🎯 Prerequisites:

  • Node.js installed (^14)
  • openssl for generating SSL certificates (required for DeviceMotion API). If you do not have OpenSSL, you can use other tools to generate the necessary ssl files.
  • xdotool This project uses xdotool to simulate mouse events, which is only supported on Linux systems. For other operating systems, modifications will be necessary.

🚀 Quick Start

  1. Clone the repository and navigate into the project folder.

    git clone https://github.com/cesarleaz/WebMotionMouse.git
    cd WebMotionMouse
  2. Install dependencies:

    npm install
  3. Generate SSL certificates to enable DeviceMotion API (required for mobile motion tracking):

    openssl req -nodes -new -x509 -keyout key.pem -out cert.pem -days 365
  4. Start the server:

    node server.js
  5. A QR code will be generated in the terminal. Scan the QR code with your mobile device to access the web interface.

Access:

  • Open your mobile browser and scan the QR code or manually on terminal.

Note

  • The server runs on any available port (automatically assigned).
  • Make sure your device is connected to the same local network as the server.

Warning

  • DeviceMotion API requires SSL: For motion controls to work, make sure you're serving the app via HTTPS.
  • Tested only on Linux systems: This project uses xdotool to simulate mouse events, which is only supported on Linux systems. For other operating systems, modifications will be necessary.

📜 Command for SSL Generation:

openssl req -nodes -new -x509 -keyout key.pem -out cert.pem -days 365

💡 Suggestions for Improvements:

  • Add Mouse Scrolling: Implement a feature to allow scrolling through the web interface.
  • Click & Drag: Add support for click-and-drag operations on the mousepad.

🤝🏼 Contributions:

Feel free to improve this project by opening issues or submitting pull requests. Your contributions are welcome!

  • Report bugs: Open an issue to help us track any bugs or potential improvements.
  • Suggest features: Do you have ideas on how to improve the app? Let us know!
  • Submit Pull Requests: Contribute to the project by submitting your code to help enhance its functionality.

📜 License:

This project is open source under the MIT License.

About

WebMotionMouse allows you to control the cursor and perform clicks on your server using your mobile device. With just a QR code scan, you can adjust sensitivity and navigate seamlessly—all powered by JavaScript!

Topics

Resources

License

Stars

Watchers

Forks