AirControl Mouse Pro (Studio Edition v2.0.0) transforms any standard Windows webcam into a low-latency, conflict-free 21-gesture desktop command studio — uniting smooth cursor tracking, zero-jump precision aim, drag-and-drop, clipboard shortcuts, media transport, and hardware-level safety interlocks in a bespoke PySide6 dark interface.
Studio Preview • Highlights • Quick Start • 21 Gesture Controls • Safety Architecture • Repository Layout • Testing
Home Dashboard — Corner-bracketed 21-keypoint OpenCV HUD, glowing KPI cards, 240° Live FPS & Confidence radial gauges, and real-time 16:9 Desktop Cursor Radar.
21 Vector-Illustrated Gesture Cards — Color-coded postures, action remapping & live cyan highlight |
Calibration Studio — EMA smoothing, palm-normalized pinch, Precision speed & SQLite persistence |
Telemetry & Session Analytics — Explicitly separates Detected Postures from Executed OS Actions with custom QPainter area-gradient FPS/latency curves and CSV export.
| Pillar | What Makes AirControl Mouse Pro Different |
|---|---|
| 21 Orthogonal Gestures | Every hand posture is normalized by anatomical palm scale (max(d(WRIST, MIDDLE_MCP), d(INDEX_MCP, PINKY_MCP))) and partitioned into mutually exclusive geometric states with hysteresis — eliminating accidental clicks during cursor motion. |
| Zero-Jump Precision Mode | Forming an upright L-shape (#12) anchors the current screen coordinate and scales subsequent hand deltas (0.30x default) for pixel-level targeting with zero cursor teleportation on entry or exit. |
| Master Studio PySide6 UI | Custom hardware-accelerated QPainter widgets: breathing status orb, glowing top-bar KPI tiles, dual radial arc gauges, live 16:9 screen radar, and procedural vector hand + mouse illustrations on all 21 cards. |
| Multi-Layer Safety Gate | Finite state machine (STOPPED / ACTIVE / PAUSED / EMERGENCY_STOP), Safe Simulation Mode, automatic mouse-button release on hand loss/shutdown, and always-active global Win32 hotkeys (F12, F9, Ctrl+Shift+R). |
| Honest SQLite Telemetry | Persists user calibration, custom action remaps, session uptimes, and per-gesture Detected vs. Executed counts locally in data/aircontrol.db without cloud calls or unmeasured accuracy claims. |
Dedicated QThread Pipeline |
Camera capture, MediaPipe 21-landmark inference, and gesture dispatch run on a clean worker QThread communicating with the Qt GUI strictly via thread-safe signals. |
- OS: Windows 10 or Windows 11 (64-bit) with a built-in or USB webcam
- Python: 64-bit Python 3.11, 3.12, or 3.13
Open PowerShell and run:
git clone https://github.com/abdulsalam025/AirControlMousePro.git
cd AirControlMousePro
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
.\scripts\setup.ps1
.\scripts\launch.ps1What setup.ps1 + launch.ps1 do automatically:
- Detect a compatible 64-bit Python
3.11–3.13interpreter and create.venv. - Install verified Windows wheels (
mediapipe==1.2.0,opencv-contrib-python,PySide6==6.11.0,PyAutoGUI==0.9.54,numpy<2.5.0,Pillow,pytest). - Cache the official MediaPipe
hand_landmarker.taskbundle locally inassets/models/for 100% offline operation. - Run bytecode verification + all 13 automated
pytesttests, then launch AirControl Mouse Pro.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python main.pyFirst-Time Tip: Enable Safe Preview Mode in the bottom-left sidebar dock when testing lighting or camera placement. Every landmark, bounding box, gauge, and 21-card highlight runs live while OS cursor/key injection stays safely locked.
| # | Control | Orthogonal Hand Posture | Timing / Hysteresis | OS Action |
|---|---|---|---|---|
| 1 | Move Cursor | Upright index finger (middle/ring/pinky curled, thumb neutral) | Continuous (EMA + dead-zone) | Smooth OS cursor movement |
| 2 | Left Click | Thumb + Index fingertip pinch tap & release | Hold < 0.35s |
Single Left Click on release |
| 3 | Drag & Drop | Thumb + Index pinch held + hand movement | Hold >= 0.35s |
Press & hold Left Button, drag, release on unpinch |
| 4 | Right Click | Thumb + Middle fingertip pinch (index upright) | 70 ms confirm / 450 ms cooldown |
Context-menu Right Click |
| 5 | Double Click | Index + Pinky upright (rock / horns sign) | 180 ms confirm / 650 ms cooldown |
Double Left Click |
| 6 | Vertical Scroll | Index + Middle upright V-sign (d(8,12)/palm >= 0.23), move up/down |
70 ms confirm |
Smooth vertical scroll up / down |
| # | Control | Orthogonal Hand Posture | Timing / Gate | System Effect |
|---|---|---|---|---|
| 7 | Pause Tracking | Closed fist (all 4 fingers curled, neutral thumb) | ~0.28s hold |
Switches ACTIVE → PAUSED & releases held buttons |
| 8 | Resume Tracking | Vertical Thumbs-Up while PAUSED |
~0.20s hold + 0.85s guard |
Resumes PAUSED → ACTIVE (never overrides Emergency Stop) |
| 9 | Screenshot | 4 upright fingers + thumb tucked | ~0.50s hold |
Saves timestamped PNG to data/screenshots/ |
| 10 | Switch Window | 3 upright fingers (Index, Middle, Ring) + thumb out | ~0.26s hold (single-fire) |
Triggers Alt + Tab window switcher |
| 11 | Emergency Stop | All 5 fingers spread wide (splay > 0.88) or F12 |
~0.60s hold / instant key |
Latches EMERGENCY_STOP & releases all OS input |
| 12 | Precision Mode | Upright index + thumb extended sideways ("L" shape) | ~0.35s hold |
Zero-jump fine-aim slow cursor (0.30x configurable) |
| # | Control | Orthogonal Hand Posture | Dispatch Mode | Shortcut / Media Key |
|---|---|---|---|---|
| 13 | Copy | Thumb + Ring fingertip pinch | Single-fire latched | Ctrl + C |
| 14 | Paste | Thumb + Pinky fingertip pinch | Single-fire latched | Ctrl + V |
| 15 | Undo | 3 upright fingers (Index, Middle, Ring) + thumb tucked | Single-fire latched | Ctrl + Z |
| 16 | Redo | 4 upright fingers close together (splay <= 0.88) + thumb out |
Single-fire latched | Ctrl + Y |
| 17 | Play / Pause Media | Upright Index + Middle with fingertips pressed together (< 0.23) |
Single-fire latched | Media playpause |
| 18 | Volume Up | Vertical Thumbs-Up while ACTIVE |
Repeats every 260 ms |
Media volumeup |
| 19 | Volume Down | Vertical Thumbs-Down while ACTIVE |
Repeats every 260 ms |
Media volumedown |
| 20 | Previous Track | Horizontal index point Left (other fingers curled) | Single-fire latched | Media prevtrack |
| 21 | Next Track | Horizontal index point Right (other fingers curled) | Single-fire latched | Media nexttrack |
| Shortcut | Scope | Action |
|---|---|---|
F12 |
Global (Win32 + App) | Immediate Emergency Stop — halts worker & releases any held mouse button |
F9 |
Global (Win32 + App) | Keyboard-Only Pause / Resume toggle (ACTIVE ↔ PAUSED) |
Ctrl + Shift + R |
Global (Win32 + App) | Keyboard-Only Emergency Reset & resume tracking |
+-------------------+
| STOPPED |
+---------+---------+
| Start Tracking
v
+-------------------+ Closed Fist (~0.3s) / F9 +-------------------+
| ACTIVE | -------------------------------> | PAUSED |
| (Live / Preview) | <------------------------------- | (Cursor Locked) |
+---------+---------+ Thumbs-Up (~0.2s) / F9 +---------+---------+
| |
| 5-Finger Spread (~0.6s) or Global F12 | Global F12
+------------------------+-----------------------------+
v
+---------------------------+
| EMERGENCY_STOP |
| (Latched: Thumbs-Up OFF) |
+-------------+-------------+
| Explicit Ctrl+Shift+R or GUI Confirmation
v
STOPPED / ACTIVE
- Guaranteed Button Release: Losing hand landmarks, pausing, triggering Emergency Stop, switching to Safe Preview, or closing the window immediately invokes
MouseController.release_all()so the left mouse button can never remain stuck down. - Emergency Latch Integrity: Ordinary gestures (such as Thumbs-Up) are strictly blocked from clearing
EMERGENCY_STOP; recovery requires explicitCtrl+Shift+Ror user confirmation in the GUI dialog.
AirControlMousePro/
|-- main.py # High-DPI application entry point & rotating log setup
|-- requirements.txt # Verified Python 3.11-3.13 Windows dependencies
|-- app/
| |-- config.py # Enums, 21-card metadata & validated AppSettings
| |-- hand_tracker.py # MediaPipe 21-landmark engine & sci-fi OpenCV HUD renderer
| |-- gesture_recognizer.py # Palm-normalized 21-posture classifier with hysteresis
| |-- gesture_manager.py # Temporal confirmation, cooldown, repeat & Precision dispatch
| |-- mouse_controller.py # ROI mapping, EMA filter, dead-zone, Precision & PyAutoGUI
| |-- safety_manager.py # Thread-safe state machine & Win32 global hotkey poller
| |-- settings_manager.py # SQLite configuration persistence (data/aircontrol.db)
| |-- statistics_manager.py # SQLite session/event telemetry & CSV exporter
| |-- camera_worker.py # QThread capture/inference loop with disconnect recovery
| |-- theme.py # Multi-stop dark studio QSS & category palettes
| |-- main_window.py # Sidebar navigation, LiveStatusOrb & shortcut coordinator
| `-- widgets/
| |-- studio_widgets.py # Custom QPainter gauges, radar, orb & 21 vector hand cards
| |-- dashboard_page.py # Hero header, Glow KPIs, HUD viewport & command dock
| |-- gesture_page.py # 21-card studio grid, action remapper & live event log
| |-- settings_page.py # Calibration sliders, camera scanner & safety mode controls
| `-- statistics_page.py # Area-gradient FPS/latency & Detected-vs-Executed charts
|-- scripts/
| |-- setup.ps1 # Automated Python 3.11-3.13 & .venv bootstrapper
| |-- launch.ps1 # Dependency installer, model cacher, pytest runner & launcher
| `-- generate_assets.py # Generates studio UI screenshots into assets/screenshots/
|-- assets/
| |-- banner.svg # Vector repository hero banner
| `-- screenshots/ # Auto-rendered Studio Edition UI previews
`-- tests/
|-- test_coordinate_mapping.py # Bounds, tremor dead-zone & zero-jump Precision scaling
|-- test_gesture_logic.py # All 21 orthogonal postures, drag/tap, guard & latching
`-- test_safety_manager.py # Emergency latch, button release, SQLite & Studio UI render
All gesture math, coordinate mapping, safety interlocks, SQLite persistence, and PySide6 Studio UI pages are verified with mocked mouse/camera backends (never moving your real cursor during tests):
.\.venv\Scripts\python.exe -m pytest -vReleased under the MIT License.

