A Python framework for controlling Windows via hand gestures detected through MediaPipe.
CameraSource → LandmarkDetector → GestureRecognizers
→ GestureEvent → BindingEngine → ConfirmationManager → ActionDispatcher → OSAdapter
| Layer | Responsibility |
|---|---|
camera/ |
Camera access, frame capture |
vision/ |
MediaPipe wrapper, landmark normalization |
gestures/ |
Gesture recognizers, GestureEvent production |
bindings/ |
Binding lookup, cooldown, trigger matching |
confirmation/ |
Confirmation policies (hold, repeat, hotkey) |
actions/ |
Action definitions, Pydantic param models |
os_control/ |
OS operations (stub → real impl) |
ui/ |
Overlay interface (console → GUI) |
config/ |
bindings.json — all bindings stored here |
GestureRecognizerhas no knowledge ofActionActionhas no knowledge ofGestureBindingnever executes OS commands directly- All OS calls flow through
OSAdapter - All action calls flow through
ActionDispatcher - Action params are validated via Pydantic models
Install dependencies:
pip install -r requirements.txtGUI mode (camera + DearPyGui interface):
python -m app.main --guiSelect a specific camera:
python -m app.main --gui --camera=1Demo mode (no camera, simulated gesture events):
python -m app.mainpytest tests/- Create
gestures/recognizers/my_gesture.pyinheritingGestureRecognizer - Register it in
app/main.py - Add a binding in
config/bindings.json
- Create or extend an
actions/*.pyfile inheritingAction - Define a Pydantic
params_model - Register it in
app/main.py