Skip to content

AyushPrad2907/Virtual-Keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🎹 Virtual Hand-Controlled Keyboard (OpenCV + MediaPipe)

Type without touching your keyboard!
This project lets you control a virtual keyboard using your hands, powered by OpenCV and MediaPipe.
Simply hover your finger over the virtual keys displayed on the screen β€” when your finger "presses" a key (detected by depth and gesture logic), it registers as input!


πŸš€ Features

  • πŸ–οΈ Hand Tracking: Real-time detection using MediaPipe’s hand landmarks.
  • ⌨️ Virtual Keyboard Interface: Interactive on-screen keyboard made using OpenCV.
  • πŸ’‘ Hover Typing: Press keys by moving and holding your index finger over them.
  • 🧠 Smart Key Detection: Detects finger distance to simulate a β€œkey press.”
  • ⚑ Real-Time Performance: Smooth and responsive interface for real typing feel.
  • πŸ”Š Optional Sound Feedback: (Add feature) to play key-click sound on press.

🧠 Tech Stack

  • Language: Python
  • Libraries:
    • OpenCV – for computer vision & UI
    • MediaPipe – for hand landmark detection
    • NumPy – for image array manipulation
    • (Optional) pyautogui or keyboard – to simulate real key presses

πŸ–₯️ How It Works

::contentReference[oaicite:0]{index=0}

  1. The webcam captures your hand movements.
  2. MediaPipe detects 21 hand landmarks, including fingertips and joints.
  3. OpenCV displays a virtual keyboard layout on screen.
  4. When your index finger hovers close enough to a key, the program interprets it as a key press.
  5. The pressed key appears in the terminal or on a text box.

🧩 Installation

  1. Clone the repository

    git clone https://github.com/<your-username>/VirtualKeyboard.git
    cd VirtualKeyboard
  2. Install dependencies

    pip install opencv-python mediapipe numpy pyautogui
  3. Run the project

    python virtual_keyboard.py

🧠 Demo Preview

::contentReference[oaicite:1]{index=1}

(Add a screenshot or a short GIF of the keyboard in action β€” showing typing in air.)


πŸ§‘β€πŸ’» Author

Ayush Pradhan
πŸ’Ό Full Stack + AI Developer | Passionate about Human-Computer Interaction using AI & Vision
πŸ”— LinkedIn | GitHub


⭐ Support

If this project amazed you, give it a ⭐ and share it!
Your support keeps innovation alive πŸ’‘


🧩 Future Enhancements

  • Add gesture-based Shift / Backspace / Space
  • Add multilingual keyboard layouts
  • Integrate AI auto-completion or speech feedback
  • Use depth estimation for more accurate key pressing

β€œTouchless technology isn’t the future β€” it’s already here.” ✨

About

πŸ–οΈ A Virtual Hand-Controlled Keyboard built with OpenCV and MediaPipe β€” type without touching the keys! Real-time finger tracking lets you press keys in the air.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages