This project allows you to control your computer's mouse and a virtual keyboard using hand gestures detected through your webcam. It is built with Python using OpenCV, MediaPipe, and PyAutoGUI.
- π§ Mode Switching: Seamlessly switch between Mouse, Keyboard, and Neutral modes with a fist gesture.
- π― Smoothed Mouse Control: Jitter-free cursor movement that follows your index finger.
- π€ Gesture-Based Clicks: Perform a left-click by pinching your index finger and thumb.
- β¨οΈ Virtual Keyboard: Type on a screen-rendered keyboard using a dwell-to-type mechanism.
-
Clone the repository or create the file structure: Ensure you have the files
main.py,utils.py,gestures.md, andREADME.mdin a folder namedvirtual-mouse-keyboard. -
Install dependencies: Open your terminal and run the following command to install the required Python libraries.
pip install opencv-python mediapipe pyautogui numpy
Navigate to the project directory in your terminal and run the main script:
cd path/to/virtual-mouse-keyboard
python main.pyπΈ A window will open showing your webcam feed. Press 'q' to quit the application at any time.
π Refer to gestures.md for a full guide on how to control the application.
Coming Soon: A GIF or short demo video showing the mouse and keyboard in action!
This project is licensed under the MIT License
Pull requests are welcome! For major changes, open an issue first to discuss what youβd like to change.
If you like this project, leave a β on the repo and share it with your peers!
π¨βπ» Developed by: Saptarshi Mukherjee