WEB based mobile gamepad controller.
Control emulators or games or OS via mobile . (retroarch, OpenEmu, nes, etc)
MacOs requaried to add Terminal.app to "Security & Privacy" -> "Privacy" -> "Accessibility"
Still three optimizations for the game process:
- Arrow buttons have been replaced with a joystick;
- Joystick replaced with swipe gestures;
-
Clone repo;
-
Install deps
% python3 -m venv web_gamepad
% pip3 install -r requirements.txt- start server on mac
% python3 server.py
WEB SERVER STARTED
http://127.0.0.1:8000 - check your local IP
WS SERVER STARTED
ws://127.0.0.1:8765 - check your local IP-
navigate to WEB SERVER on your mobile (sacn QR)
-
connect to WS SERVER IP
Hardcoded keys:
1: 37, // left
2: 38, // up
3: 39, // right
4: 40, // down
5: 13, // start . Enter
6: 9, // select . Tab
7: 90, // btn a . Z
8: 88, // btn b . X
9: 65, // btn turbo a. A
10:83, // btn turbo b. SBig Sur: Key codes do not work for uppercase letters
- convert script to app (Automator??)
- add second gamepad
- add sega gamepad
- add qr code for URL to connect