Skip to content

Eng-Elias/Hands_Gestures_Virtual_Mouse_and_Keyboard

Repository files navigation

Hand-Gesture AI Virtual Mouse and Keyboard

Hand-Gesture AI Virtual Mouse and Keyboard Demo Video

Overview

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.

Features

  • 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.

To-Do

  • Add scrolling functionality to the virtual mouse
  • Enhance the UI
  • Enhance the UX
  • Enhance the smoothness of movements
  • ...

Installation

  1. Clone the repository.
  2. Create python virtual environment and activate it.
  3. Install dependencies using pip install -r requirements.txt.
  4. Run py main.py for combined mouse and keyboard control or run standalone scripts for individual controls.

Usage

  • 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.

Medium Articles

Contributing

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!

License

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

Support

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.

https://www.buymeacoffee.com/eng_elias

Buy Me a Coffee

About

Control mouse and keyboard with hands gestures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages