An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

![LazyDS4 Banner](rsc/banner.png)

### _Direct DualShock 4 to XInput Mapper for Windows_

[![Build Status](https://img.shields.io/badge/build-Stable-blue?style=for-the-badge)](#)
[![Version](https://img.shields.io/badge/Version-v2.1.0-darkred?style=for-the-badge)](#)
[![License](https://img.shields.io/badge/License-MIT-purple?style=for-the-badge)](LICENSE)
[![Downloads](https://img.shields.io/github/downloads/Ivan-Ayub97/LazyDS4/total?style=for-the-badge&color=gold)](https://github.com/Ivan-Ayub97/LazyDS4/releases)
[![Last Commit](https://img.shields.io/github/last-commit/Ivan-Ayub97/LazyDS4?style=for-the-badge&color=2E8B57&logo=git&logoColor=white)](https://github.com/Ivan-Ayub97/LazyDS4/commits/main)
[![Platform](https://img.shields.io/badge/Platform-Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)](#)
[![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=FFD700)](https://www.python.org/)
[![Issues](https://img.shields.io/github/issues/Ivan-Ayub97/LazyDS4?style=for-the-badge&color=FF4500&logo=github&logoColor=white)](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:




Download LazyDS4





Download from GitHub


### 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

![LazyDS4](rsc/lazyds4.gif)

- **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

![Screenshot](rsc/Capture2.png)

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

![Screenshot](rsc/Capture3.png)

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

![Screenshot](rsc/Capture4.gif)

---

## โœจ 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.**