English | νκ΅μ΄
Hands-free page turning with nothing but your webcam.
Swipe your hand. Turn the page. Keep reading.
Quick Start Β· Gestures Β· Permissions Β· Troubleshooting
Bookswipe is a tiny Python app that detects hand swipes through your webcam and sends keyboard arrow presses.
It is built for simple hands-free reading:
- Swipe your right hand to the left β press
Right Arrow - Swipe your left hand to the right β press
Left Arrow - Press
ESCβ quit
No account. No server. No setup dashboard. Just one Python file.
If you already have this project locally:
cd /Users/hani/Projects/bookswipeIf you downloaded it somewhere else:
cd path/to/bookswipepython3.12 --versionPython 3.12 is recommended and tested. The dependency versions in requirements.txt are pinned from a working Python 3.12.13 setup.
If Python is not installed on macOS, install it with Homebrew:
brew install python@3.12python3.12 -m venv .venvsource .venv/bin/activateYou should now see (.venv) at the beginning of your terminal prompt.
python -m pip install --upgrade pip
pip install -r requirements.txtpython main.pyThat's it. A camera window should open.
| Gesture | Result |
|---|---|
| Right hand swipes left | Presses Right Arrow |
| Left hand swipes right | Presses Left Arrow |
ESC in the camera window |
Quits the app |
Tip: keep your hand visible to the webcam and make a clear horizontal swipe.
Bookswipe needs two macOS permissions because it uses your webcam and sends keyboard input.
Open:
System Settings > Privacy & Security > Camera
Allow the app you use to run python main.py.
Common examples:
- Cursor
- VSCode
- Terminal
- iTerm
Open:
System Settings > Privacy & Security > Accessibility
Allow the app you use to run python main.py.
Common examples:
- Cursor
- VSCode
- Terminal
- iTerm
After changing permissions, fully quit and reopen your terminal or editor.
If your iPhone camera opens instead of the MacBook camera, macOS is selecting Continuity Camera as the default webcam.
To use the MacBook camera, turn off Continuity Camera on your iPhone:
iPhone Settings > General > AirPlay & Continuity > Continuity Camera
Then quit and reopen Cursor, VSCode, Terminal, or iTerm before running Bookswipe again.
After the first setup, you only need:
cd path/to/bookswipe
source .venv/bin/activate
python main.pyCheck macOS camera permission:
System Settings > Privacy & Security > Camera
Also close other apps that may already be using the camera.
Check macOS Accessibility permission:
System Settings > Privacy & Security > Accessibility
Then fully quit and reopen Cursor, VSCode, Terminal, or iTerm.
Your virtual environment is probably not active, or dependencies were not installed.
source .venv/bin/activate
pip install -r requirements.txt
python main.pyUse python3.12 directly:
python3.12 main.pyOr activate the virtual environment first:
source .venv/bin/activate
python main.pyBookswipe uses:
opencv-pythonto read webcam framesmediapipeto detect handspyautoguito press arrow keys
The app keeps a short history of each hand's horizontal position. When the movement passes the swipe threshold, it sends the matching arrow key and plays sound.wav.
bookswipe/
βββ main.py
βββ sound.wav
βββ requirements.txt
βββ README.md
βββ README.ko.md
One file runs the app. The README files explain how to run it.
