Skip to content

myCodeWorksSometimes/HANDS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HANDS

HANDS Banner Image

This project uses MediaPipe hand tracking to map left-hand mode selection and right-hand gestures into OS actions (mouse, scrolling, media controls, and system shortcuts).

Features

  • Webcam hand tracking with mediapipe + opencv-python
  • Gesture-based mouse movement, click, double-click, drag, and right-click
  • Scroll mode with vertical and horizontal scrolling
  • Media mode for volume, mute, play/pause, next/previous track
  • System mode for Alt+Tab, task view, show desktop, screenshot, and close window
  • Runtime settings UI (s key) with persistence in hands/settings.json

How To Run (.bat file)

From the project root, in powershell:

.\setup.bat

How To Run (pwsh)

Install the requirements below before this. From the project root:

.\venv\Scripts\activate
python -m hands.main

Requirements

  • Windows 10/11
  • Python 3.10+ (3.11 recommended)
  • A working webcam

Installation

From the project root:

python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt

Note: use .\venv\Scripts\activate.ps1 for Windows

How it works

media

Mode Selection (Left Hand)

  • Open palm (or no left hand): Cursor mode
  • Fist: Scroll mode
  • Pointing: Media mode
  • L-shape: System mode

Right-Hand Gesture Overview

Cursor Mode

  • Move index fingertip to move cursor
  • Pinch = click
  • Quick repeated pinch = double click
  • Hold pinch = drag
  • Three-finger pinch = right click

Scroll Mode

  • Index only = scroll up
  • Index + middle = scroll down
  • Thumb only = horizontal scroll right
  • Pinky only = horizontal scroll left

Media Mode

  • Thumb only = volume up
  • Pinky only = volume down
  • V-shape = mute toggle
  • Open palm = play/pause
  • Three middle fingers - next track
  • thumb and pinky - previous track

System Mode

  • L-shape + horizontal movement = Alt+Tab navigation
  • Four fingers = task view
  • Fist = show desktop
  • Pinky hold = screenshot
  • V-shape hold = close active window

In-App Keyboard Controls

  • q - Quit
  • s - Open settings window

Settings

  • Runtime-tunable values are loaded from hands/settings.json.
  • Default constants live in hands/config.py.
  • Press s during runtime to open the settings window and save changes.

Settings menu image

Troubleshooting

  • If camera does not open, check WEBCAM_INDEX in hands/config.py.
  • If gestures feel too fast/slow, tune SENSITIVITY, EASING, and FRAME_MARGIN from settings.
  • If media/system keys do not work in some apps, run the terminal as Administrator.
  • If dependencies fail to install, upgrade pip first: python -m pip install --upgrade pip.

Image Gallery

media

media

media

media

Credits

👥 Team

🛠️ Resources

This Canva theme for those images shared above


Made with ❤️ by Afaq, Munhim, Zamin

About

A real-time gesture based desktop navigation system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors