AirInput
Turn your smartphone into a wireless gamepad for PC. Browser-based, no app installation required.
Install / Use
/learn @DiegoCChumbi/AirInputREADME
Español: Puedes leer este documento en español aquí.
AirInput
Turn your smartphone into a wireless controller for your PC. Play your games with customizable gamepad layouts directly from your browser, no app installation required.
Features
- 🌐 Browser-Based: No mobile app needed - works entirely in your phone's browser
- 🎨 Multiple Layouts: Choose between classic or modern style
- 🔌 Virtual Gamepad: Create a virtual controller recognized by games
- 📱 Multi-Player Support: Connect multiple devices as separate controllers
- ⚡ Low Latency: Real-time input streaming via WebSockets and UDP
- 🔧 Cross-Platform: Supports Windows and Linux
- 📶 Local Network: All communication stays on your local network
Quick Start
Prerequisites
- Node.js (v14 or higher)
- Python (3.7 or higher)
- Go (1.19 or higher)
Installation
Clone the repository
git clone https://github.com/DiegoCChumbi/airInput.git
cd airInput
Install Node.js dependencies
npm install
Install Python dependencies
Windows:
pip install vgamepad
Linux:
-
Debian, Ubuntu, Linux Mint, Pop!_OS (
apt):sudo apt update sudo apt install python3-dev libudev-dev -
Fedora, RHEL, CentOS (
dnf):sudo dnf install python3-devel libudev-devel -
Arch Linux, Manjaro (
pacman):sudo pacman -S base-devel
Build the Go executable
Windows:
go build -o airInput.exe airInput.go
Linux:
go build -o airInput airInput.go
Running airInput
Simply run the compiled executable:
Windows:
airInput.exe
Linux:
sudo ./airInput
On Linux, sudo is required to create virtual gamepads.
The application will:
- Start the web server on port 3000
- Display the connection URL and QR code in the terminal
- Launch the virtual gamepad controller
Connect Your Phone
- Make sure your phone is on the same WiFi network as your PC
- Open your phone's browser and navigate to the URL shown in the terminal (Or scan the QR that will appear)
- Tap "TAP TO START" to activate the controller
- Choose your preferred layout in settings (⚙️)
How It Works
┌─────────────┐ WebSocket ┌──────────────┐
│ Browser │ ◄─────────────────────────► │ Node.js │
│ (Phone) │ (Button/Axis Data) │ Server │
└─────────────┘ └──────┬───────┘
│
UDP│ (Port 9999)
│
┌──────▼───────┐
│ Python │
│ Controller │
└──────┬───────┘
│
Virtual│Gamepad API
│
┌──────▼───────┐
│ Xbox 360 │
│ Controller │
│ Virtual │
└──────────────┘
- Web Interface: HTML5-based touch control with NippleJS for joysticks
- WebSocket Server: Node.js with Socket.IO for real-time communication
- UDP Bridge: Forwards input data to Python controller
- Virtual Gamepad: Python creates virtual Xbox 360 controllers using platform-specific libraries
- Process Manager: Go orchestrates Node.js and Python processes
Project Structure
airInput/
├── airInput.go # Go process manager
├── server.js # Node.js WebSocket server
├── controller-win.py # Windows virtual gamepad
├── controller-linux.py # Linux virtual gamepad
├── package.json # Node.js dependencies
├── go.mod # Go module definition
└── public/ # Web client
├── index.html # Main HTML
├── script.js # Client logic
├── global.css # Base styles
└── skins/ # Controller layouts
├── snes/ # Classic layout
└── xbox/ # Modern layout
Configuration
The web server runs on port 3000 by default. To change it, edit server.js:
const PORT = 3000; // Change this value
UDP communication uses port 9999. Make sure this port is available on your system.
Connection Issues
- Verify that your phone and PC are on the same network
- Check that firewall settings allow connections on port 3000
- Disable VPN if active
Input Lag
- Reduce the distance between phone and WiFi router
- Close other applications using network bandwidth
- Use the 5GHz WiFi band if available
Contributing
Contributions are welcome! Feel free to:
- Report bugs by opening an issue
- Suggest new features or improvements
- Submit pull requests with enhancements
- Contribute with new custom layouts
License
This project is licensed under the MIT License.
Acknowledgements
- NippleJS - Virtual joystick library
- Socket.IO - Real-time communication
- vgamepad - Virtual gamepad for Windows
- ViGEmBus - Virtual gamepad driver for Windows
TODO
- [ ] Allow phone user to input a name to identify each controller
- [ ] Allow to link phones with controller numbers
Note: This is a local network solution. Your phone and PC must be connected to the same WiFi network.
Related Skills
apple-reminders
343.3kManage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
gh-issues
343.3kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
oracle
343.3kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
