🎯 Human-like mouse movements powered by bezier curves and spline interpolation. Ultra-realistic cursor automation.
Human Mouse is a sophisticated Python package that generates ultra-realistic mouse movements by implementing advanced mathematical algorithms. It uses a combination of bezier curves and spline interpolation to create smooth, natural-looking cursor trajectories that closely mimic human behavior.
pip install human-mouse
Move cursor to specific coordinates with natural trajectory
mouse = MouseController()
mouse.move(500, 300) # Move to coordinates
mouse.move(800, 600, speed_factor=0.5) # Move faster
Move to a random screen position using human-like patterns
mouse.move_random() # Move to random position
mouse.move_random(speed_factor=2.0) # Slower random movement
Execute a single click
mouse.perform_click(500, 300) # Move and click
Natural double click
mouse.perform_double_click(500, 300) # Move and double click
Right-click action
mouse.perform_context_click(500, 300) # Move and right click
Enable zigzag movements for more natural patterns
zigzag_mouse = MouseController(always_zigzag=True)
zigzag_mouse.move(500, 300)
Linux virtual display support
virtual_mouse = MouseController(is_virtual=True)
virtual_mouse.move(500, 300)
- Bezier curve interpolation for smooth trajectories
- Spline-based path generation
- Randomized movement variance
- Natural acceleration/deceleration
- Configurable zigzag patterns
- Windows: Full native support
- macOS: Full native support
- Linux: Supports both native and virtual displays
from human_mouse import MouseController
import time
# Initialize controller
mouse = MouseController(always_zigzag=True)
# Perform series of actions
mouse.move(500, 300) # Move to position
time.sleep(0.5) # Wait briefly
mouse.perform_click() # Click
time.sleep(0.5) # Wait briefly
mouse.move_random() # Move to random position
mouse.perform_double_click() # Double click
- Python 3.10+
- Dependencies:
- numpy
- pyautogui
- scipy
- python-xlib (optional, for Linux virtual display)
We welcome contributions! Please feel free to submit pull requests.
MIT License - see the LICENSE file for details.
- Issues: GitHub Issues