Scroll YouTube, PDFs, docs, social feeds — any Windows app — with hand gestures via your webcam. All AI runs locally; nothing leaves your PC.
Requires Python 3.9–3.12 (MediaPipe does not yet support the very newest Python versions — 3.11 is the safest choice).
pip install -r requirements.txt
python airscroll.pyOn Windows, run the terminal as Administrator if the global hotkey doesn't respond (the keyboard library sometimes needs it).
- Launch the app — a tray icon appears (grey = off).
- Press Ctrl + Shift + A (or tray menu → Activate).
- A permission dialog asks for camera consent — camera never opens before you allow it.
- Raise your hand in front of the webcam:
- Open palm, move up/down → smooth momentum scrolling
- Fist → instantly pause / brake
- Two fingers (index+middle) → fast scroll
- Move slowly → precision scroll
- Press Ctrl + Shift + A again → tracking stops and the webcam is fully released (light turns off).
- Tray menu → Quit to exit.
- Camera opens only after activation and explicit user consent (
ask_camera_permission). - On deactivate,
cap.release()is always called in afinallyblock — the camera cannot stay open. - Frames are processed in memory and discarded; nothing is written to disk or network.
- MediaPipe hand tracking runs fully on-device.
Edit the constants at the top of airscroll.py:
| Setting | Effect |
|---|---|
SENSITIVITY |
scroll amount per hand movement |
MOMENTUM_FRICTION |
how long scrolling glides (0.85–0.95) |
DEADZONE |
ignore hand jitter |
HOTKEY |
toggle shortcut |
SHOW_PREVIEW |
set True to see a debug camera window with hand landmarks |
- Works system-wide (it sends real scroll-wheel events), so no browser extension is needed.
- Good lighting improves tracking a lot.
- macOS/Linux: works, but replace the
keyboardhotkey withpynputand grant Accessibility + Camera permissions (macOS).