On this page
Desktop Controller is a Python application for interacting with a computer through webcam-tracked hand gestures and voice input. It also includes a mobile touchpad mode for cursor movement and left-click control over a shared local network.
Problem statement
Desktop interaction usually depends on a physical mouse and keyboard. Touchscreens can offer another input method, but are not standard on many desktop systems. The project explores webcam-based computer vision and microphone input as alternative ways to interact with a desktop.
Proposed solution
The application combines two interaction modes in a desktop interface:
- Virtual Controller: track hand landmarks from a webcam and map recognized gestures to cursor and system actions.
- Mobile Controller: start a local touchpad server and connect a mobile browser on the same network for cursor movement and left-click.
- Voice input: use a microphone speech recognizer to enter recognized speech as text.
Gesture controller
The webcam stream is processed to detect hand landmarks. The controller derives finger states and gesture classes from landmark positions, then maps selected gestures to mouse and system operations.
- 01Capture webcam frames
Read frames and prepare them for hand tracking.
OpenCV - 02Detect hand landmarks
Track hands and landmark positions in each frame.
MediaPipe Hands - 03Classify gestures
Use finger states and landmark distances to recognize gestures.
Python - 04Map gestures to actions
Move the pointer, click, drag, scroll, or adjust supported settings.
PyAutoGUI
Gesture and action examples
| Gesture input | Documented action |
|---|---|
| Two-finger V gesture | Move the cursor. |
| Fist | Hold the left mouse button while moving, for drag interactions. |
| Middle-finger gesture | Left-click after the controller's V-gesture state. |
| Index-finger gesture | Right-click after the controller's V-gesture state. |
| Closed two-finger gesture | Double-click after the controller's V-gesture state. |
| Pinch gestures | Use the dominant hand for brightness and volume; use the other hand for vertical and horizontal scrolling. |
Voice input
The desktop interface includes a microphone control. Speech is recognized using the configured Google speech-recognition service, and recognized text is typed into the active desktop context. A stop control is available to end the running controller process.
Mobile touchpad mode
The optional mobile mode starts a local Flask-SocketIO server and displays its network address as a QR code. A phone browser on the same network can send cursor movement, scrolling, and mouse-button events to the desktop. The repository describes this mode as supporting cursor movement and left-click; it is separate from webcam hand tracking.
Demo video
Load the project demonstration in the player below.
Technology stack
Tools and libraries identified in the project source and requirements include:
Language
- Python
Computer Vision
- OpenCV
- MediaPipe Hands
Desktop Interaction
- PyAutoGUI
- screen_brightness_control
- PyCAW
Speech Input
- SpeechRecognition
- PyAudio / sounddevice
Desktop Interface
- Tkinter
- Pillow
Mobile Touchpad
- Flask
- Flask-SocketIO
- gevent
Libraries are listed according to their roles in the public project repository.
Requirements and setup
The repository documents Python 3.8 or later, a webcam, and a microphone for the desktop application. Its README recommends creating a virtual environment, installing the repository's requirements, and running python main.py. The documented platform requirement is Windows 8 or later; the mobile controller connects over the local network.
Project outcome
Desktop Controller brings webcam gesture tracking, speech-to-text input, and a companion mobile touchpad into one desktop project. The source repository includes examples for right-click, double-click, multiple selection, and brightness control. No performance measurements are claimed on this page.
A webcam and a few tracked gestures become another way to move, click, scroll, and control the desktop.
