https://github.com/ivan-ayub97/lazyds4
A controller mapping designed to convert a DualShock 4 to a virtual Xbox 360 controller.
https://github.com/ivan-ayub97/lazyds4
controller ds4 ds4-controller ds4windows dualshock4 game-controller native-controls pyqt5 python vigembus xinput xinput-calibrator xinput-controller xinput-emulator
Last synced: 2 days ago
JSON representation
A controller mapping designed to convert a DualShock 4 to a virtual Xbox 360 controller.
- Host: GitHub
- URL: https://github.com/ivan-ayub97/lazyds4
- Owner: Ivan-Ayub97
- License: mit
- Created: 2025-07-30T22:00:31.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-10-13T17:53:06.000Z (9 months ago)
- Last Synced: 2025-10-18T23:58:23.013Z (9 months ago)
- Topics: controller, ds4, ds4-controller, ds4windows, dualshock4, game-controller, native-controls, pyqt5, python, vigembus, xinput, xinput-calibrator, xinput-controller, xinput-emulator
- Language: Python
- Homepage:
- Size: 15.9 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

### _Direct DualShock 4 to XInput Mapper for Windows_
[](#)
[](#)
[](LICENSE)
[](https://github.com/Ivan-Ayub97/LazyDS4/releases)
[](https://github.com/Ivan-Ayub97/LazyDS4/commits/main)
[](#)
[](https://www.python.org/)
[](https://github.com/Ivan-Ayub97/LazyDS4/issues)
_"Transform your DualShock 4 into a native Xbox 360 controller"_
**LazyDS4** is a controller mapping application designed to convert HID input from a DualShock 4 controller directly to a virtual Xbox 360 controller. Optimized for simplicity and performance, it offers real-time input mapping with a ~1ms (1000Hz) polling rate, modern graphical interface with PyQt5, intelligent drift detection, and enhanced joystick calibration with adaptive algorithms.
---
## ๐ Download and Installation
Get the latest stable release from any of the following platforms:
### Quick Installation
1. Download the installer `LazyDS4-2.1.0-Installer.exe`
2. Run as administrator (required for ViGEmBus)
3. Installer will automatically setup ViGEmBus driver
4. Launch LazyDS4 from start menu or shortcut
---
## ๐ผ๏ธ Interface Preview
### ๐ป Main View

- **Controller Tab**: Interactive DS4 visualization with real-time status
- **Battery Monitor**: Visual indicator with level, charging state, and alerts
- **Controls**: Start/Stop buttons, Bluetooth Pairing, Calibrate
### ๐งช Other Views
- **Log Tab**: Detailed event and error logging

- **Info Tab**: Developer information, button mapping, and utilities

- **Calibration Dialog**: Interactive tool to adjust joysticks

---
## โจ Key Features
- โ
**Direct HID to XInput Mapping** โ Optimized real-time translation
- โ
**USB and Bluetooth Connection** โ Complete support for DS4 v1 and v2
- โ
**1000Hz Polling Rate** โ Ultra-fast response of ~1ms
- ๐ฏ **Smart Drift Detection** โ Automatic detection with visual alerts and severity analysis
- ๐จ **Modern Interface** with dark theme design and visual effects
- ๐ **Battery Monitor** with low battery alerts and charging status
- ๐ฏ **Enhanced Joystick Calibration** with adaptive deadzone and drift correction
- ๐ง **Automatic ViGEmBus Installation** and driver management
- ๐ฑ **Integrated Bluetooth Pairing Assistant**
- ๐ฎ **Interactive Controller Visualization** in real-time
---
## ๐ What's New (v2.1.0)
- ๐จ **Visual Overhaul** โ Modern, professional interface with gradient backgrounds and advanced styling
- ๐ **Layout Optimization** โ Improved spacing, alignment, and responsiveness
- ๐ **Icon Integration** โ Consistent use of dynamic SVG icons throughout
- โก **Enhanced Button Design** โ Polished buttons with smooth animations and clear actions
- ๐ **Responsive Interface** โ Adapted for various screen sizes without overlaps
- ๐ **Real-time Visual Indicators** โ Clear and immediate feedback for status, warnings, and battery levels
---
## โ๏ธ How to Use
1. **Connect your DualShock 4** via USB or Bluetooth
2. **Open LazyDS4** as administrator (recommended)
3. **Press "โถ Start Service"** to start mapping
4. **Configure as needed**:
- Calibrate joysticks if drift occurs
- Pair new Bluetooth controllers
- Monitor battery and connection status
5. **Enjoy Playing!** Your DS4 now works as an Xbox 360 controller
---
## ๐ Button Mapping
| **DualShock 4** | **Xbox 360** | **Function** |
| --------------- | ------------ | ------------- |
| โ (Cross) | A | Confirm |
| โ (Circle) | B | Cancel |
| โ (Square) | X | Action |
| โฒ (Triangle) | Y | Action |
| L1 | LB | Left Bumper |
| R1 | RB | Right Bumper |
| L2 | LT | Left Trigger |
| R2 | RT | Right Trigger |
| Share | Back | Menu |
| Options | Start | Pause |
| PS Button | Guide | Xbox Home |
---
## ๐พ Project Structure
```
LazyDS4/
โโโ assets/ # Resources (icons, ViGEmBus installer)
โโโ core/ # Main controller logic
โ โโโ ds4_controller.py # DualShock 4 handling
โ โโโ vigem_controller.py # ViGEm virtual controller
โโโ ui/ # PyQt5 graphical interface
โ โโโ main_window.py # Main window
โ โโโ battery_widget.py # Battery widget
โ โโโ interactive_controller.py # Controller visualization
โ โโโ calibration_dialog.py # Calibration dialog
โโโ utils/ # System utilities
โ โโโ input_translator.py # HID to XInput translator
โ โโโ vigem_setup.py # ViGEmBus installer
โ โโโ bluetooth_manager.py # Bluetooth manager
โโโ LazyDS4.py # Main file
โโโ build.py # Build script
โโโ Setup.iss # Inno Setup script
โโโ requirements.txt # Python dependencies
```
---
## ๐ System Requirements
- **OS:** Windows 10/11 (x64/x86/ARM64)
- **RAM:** Minimum 2GB (4GB recommended)
- **Controller:** DualShock 4 v1 or v2 (CUH-ZCT1/ZCT2)
- **Connection:** USB or Bluetooth 4.0+
- **Privileges:** Administrator (for ViGEmBus)
- **Dependencies:** ViGEmBus driver (installed automatically)
---
## ๐ฆ Technologies Used
| Technology | License | Author/Maintenance | Link |
| ------------ | ------------ | ---------------------------- | -------------------------------------------------------- |
| Python 3.10+ | PSF License | Python Software Foundation | [python.org](https://python.org) |
| PyQt5 | GPL v3 | Riverbank Computing | [riverbankcomputing.com](https://riverbankcomputing.com) |
| hidapi | BSD-3-Clause | Alan Ott, Signal 11 Software | [GitHub](https://github.com/libusb/hidapi) |
| vgamepad | MIT License | Yann Bouteiller | [GitHub](https://github.com/yannbouteiller/vgamepad) |
| ViGEmBus | MIT License | ViGEm Project | [GitHub](https://github.com/ViGEm/ViGEmBus) |
| PyInstaller | GPL-2.0+ | PyInstaller Development Team | [pyinstaller.org](https://pyinstaller.org) |
| Inno Setup | Inno License | Jordan Russell | [jrsoftware.org](https://jrsoftware.org) |
---
## ๐งโ๐ป Contributing
Contributions are welcome!
1. Fork the project
2. Create a branch for your improvement (`git checkout -b feature/new-feature`)
3. Make your changes and commit them (`git commit -am 'Add new feature'`)
4. Push to the branch (`git push origin feature/new-feature`)
5. Open a Pull Request with details
For bug reports or suggestions: **GitHub Issues** or contact the developer
---
## ๐ License
ยฉ 2025 Ivรกn Eduardo Chavez Ayub (@Ivan-Ayub97)
Distributed under the MIT License. See `LICENSE` for more details.
---
## ๐ง Development and Compilation
### For Developers
```bash
# Clone repository
git clone https://github.com/Ivan-Ayub97/LazyDS4.git
cd LazyDS4
# Install dependencies
pip install -r requirements.txt
# Run in development mode
python LazyDS4.py
# Build executable
python build.py
```
### Included Scripts
- **`build.py`**: Automated build with PyInstaller
- **`Setup.iss`**: Installer creation with Inno Setup
- **`LazyDS4.spec`**: Advanced PyInstaller configuration
---
**Built by the lazy, for the lazy.**