This project provides a virtual mouse and keyboard interface using computer vision and hand tracking. It leverages MediaPipe and OpenCV to detect hand gestures and translate them into mouse and keyboard actions.
- Standalone Virtual Mouse
- Standalone Virtual Keyboard
- Hand Gesture Recognition
- Merge The Virtual Mouse and Keyboard in one script where user can control mouse with his right hand and keyboard with left hand.
- Add scrolling functionality to the virtual mouse
- Enhance the UI
- Enhance the UX
- Enhance the smoothness of movements
- ...
- Clone the repository.
- Create python virtual environment and activate it.
- Install dependencies using
pip install -r requirements.txt
. - Run
py main.py
for combined mouse and keyboard control or run standalone scripts for individual controls.
-
Virtual Mouse Gestures:
- Move Mouse: Point with your index finger.
- Left Click: Raise your thumb and index finger while keeping other fingers down.
- Right Click: Raise your index and middle fingers while keeping other fingers down.
- Click and Hold: Raise your index, middle, and ring fingers while keeping your thumb down.
-
Virtual Keyboard Gestures:
- Select Key: Point with your index finger.
- Press Key: thumb-index touch.
- Press shift key to shows symbols and capital letters.
- Press shift key to heighlight keys which do an action: c (copy), x (cut), v (paste), z (undo), y (redo).
-
General:
- Press 'q' or click the window close button to exit the application.
We welcome contributions from developers and users to enhance this project. Here are a few ways you can contribute:
- Suggest Features: If you have an idea for a new feature or improvement, feel free to open an issue with your suggestion.
- Implement Features: If you are a developer, you can fork the repository, implement a new feature, and submit a pull request. Please ensure your code follows clean code standards.
- Report Bugs: If you encounter any bugs or issues, please report them by opening an issue.
- Improve Documentation: Help us improve the documentation by suggesting changes or submitting pull requests with updates.
Your contributions are greatly appreciated and help make this project better for everyone!
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
If you find this project creative and would like to support its development with other creative projects, consider buying me a book! Your support will allow me to dedicate more time to enhancing and adding new features to this project and work on more creative projects.