Turn your mobile device into a wireless trackpad for your computer. This application creates a web server that allows you to control your computer's mouse cursor using your phone or tablet's touchscreen.
- Smooth cursor control with touch tracking
- Two-finger scrolling
- Three-finger swipe for Alt+Tab window switching
- Dedicated scroll bar for precise scrolling
- Zoom bar for quick Ctrl+/- zooming
- Tap to left-click
- Visual touch feedback
- Fullscreen mode support
- Python 3.7+
- A mobile device with a modern web browser
- Computer and mobile device on the same network
- Install the required Python packages using the requirements.txt file:
pip install -r requirements.txt- Download
mobile_trackpad.pyto your computer.
- Run the server:
python mobile_trackpad.py-
The server will display a URL (e.g.,
http://192.168.1.100:5000) -
On your mobile device:
- Connect to the same network as your computer
- Open the provided URL in your web browser
- (Optional) Enable fullscreen mode for better experience
| Gesture | Action |
|---|---|
| Single finger move | Move cursor |
| Tap | Left click |
| Two-finger slide | Scroll vertically |
| Three-finger swipe | Switch windows (Alt+Tab) |
| Right scroll bar | Precise scrolling |
| Bottom zoom bar | Zoom in/out (Ctrl +/-) |
Key sensitivity settings can be adjusted in the JavaScript code:
const twoFingerScrollSensitivity = 0.3;
const mouseSensitivity = 3.5;
const scrollSensitivity = 1.0;- Uses aiohttp's WebSocket implementation for real-time communication
- Implements touch event throttling for performance
- Provides visual feedback for touch interactions
- Auto-reconnects if connection is lost
- Uses pyautogui for mouse control and keyboard shortcuts
-
Connection Issues
- Ensure both devices are on the same network
- Check if firewall is blocking port 5000
- Try using the IP address instead of localhost
-
Performance Issues
- Close other browser tabs/applications
- Reduce animation effects if needed
- Check network latency
-
Touch Not Working
- Enable touch events in your browser
- Clear browser cache
- Try a different browser
- The server accepts connections from any device on the network
- No authentication is implemented by default
- Use in trusted networks only
- Cannot simulate right-click
- Zoom functionality limited to Ctrl+/- commands
- Requires continuous network connection
- Touch gestures may vary by device/browser
Feel free to submit issues and enhancement requests!
This project is open source and available under the MIT License.