Input without any traditional device, like keyboard\mouse etc. Just on your phone only one hand. So, it's not literily hands-free, but it's really helpful when you need hold your baby in your arms👨🍼.
I'd like watching Youtube and Bilibili on my home theater system, so I added so many Youtube/Bilibili shortcut buttons on the client page. You can change or remove those buttons on the client/remote_client.html page if you like.
This project was tested on Ubuntu 24.04. If you are using the linux, it's almost working perfect.
The project needs run two server on your compurter: one for the pyautogui server, another for the h5 client. The wWhole prject was programed and tested by the python 3.12.3, but you can run the project by python 3.0+. Run the project in python venv was better than native system python envionment.
Run the client h5 page by python http.server module, if you prefer nginx or Apache, it's ok. Run the pyautogui websocket server in a python venv.
- Download the repository(main branch is ok:
git clone git@github.com:KangShanR/hands-free-input.git
) - Enter the client dir:
cd your_project_path/client
- Export all the env variables:
export SERVER_HOST="..." SERVER_PORT=... CLIENT_SERVER_PORT=...
- Server the client page to the private network:
python -m http.server $CLIENT_SERVER_PORT
. Now you can see the client page on your phone brower in the private network, just access the url: host_ip:CLIENT_SERVER_PORT/remote_client.html.- You can get your host_ip just run the command
ip addr
on the host.
- You can get your host_ip just run the command
- Enter the main dir:
cd ..
- Server the pyautogui:
nohup python auto_gui.py > log/server.log 2>&1 &
- You can see the logs by
tail -f log/server.log
- You can see the logs by