Español: Puedes leer este documento en español aquí.
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.
- 🌐 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
- Node.js (v14 or higher)
- Python (3.7 or higher)
- Go (1.19 or higher)
Clone the repository
git clone https://github.com/DiegoCChumbi/airInput.git
cd airInputInstall Node.js dependencies
npm installInstall Python dependencies
Windows:
pip install vgamepadLinux:
-
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.goLinux:
go build -o airInput airInput.goSimply run the compiled executable:
Windows:
airInput.exeLinux:
sudo ./airInputOn 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
- 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 (⚙️)
┌─────────────┐ 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
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
The web server runs on port 3000 by default. To change it, edit server.js:
const PORT = 3000; // Change this valueUDP communication uses port 9999. Make sure this port is available on your system.
- Verify that your phone and PC are on the same network
- Check that firewall settings allow connections on port 3000
- Disable VPN if active
- Reduce the distance between phone and WiFi router
- Close other applications using network bandwidth
- Use the 5GHz WiFi band if available
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
This project is licensed under the MIT License.
- NippleJS - Virtual joystick library
- Socket.IO - Real-time communication
- vgamepad - Virtual gamepad for Windows
- ViGEmBus - Virtual gamepad driver for Windows
Note: This is a local network solution. Your phone and PC must be connected to the same WiFi network.