neXn.X56.DirectOutput
2.1.0
dotnet add package neXn.X56.DirectOutput --version 2.1.0
NuGet\Install-Package neXn.X56.DirectOutput -Version 2.1.0
<PackageReference Include="neXn.X56.DirectOutput" Version="2.1.0" />
<PackageVersion Include="neXn.X56.DirectOutput" Version="2.1.0" />
<PackageReference Include="neXn.X56.DirectOutput" />
paket add neXn.X56.DirectOutput --version 2.1.0
#r "nuget: neXn.X56.DirectOutput, 2.1.0"
#:package neXn.X56.DirectOutput@2.1.0
#addin nuget:?package=neXn.X56.DirectOutput&version=2.1.0
#tool nuget:?package=neXn.X56.DirectOutput&version=2.1.0
Saitek/Logitech X56 - DirectOutput LED Wrapper
A lightweight C# / .NET 10 wrapper around the Saitek / Logitech DirectOutput.dll, focused on controlling the RGB LEDs of the X56 HOTAS.
The wrapper hides the lower-level DirectOutput API details and provides a small, straightforward interface for setting LED colors and brightness.
Background
This project originally started roughly ten years ago as my Visual Basic wrapper around the Saitek DirectOutput SDK.
It was based on the original C# DirectOutput wrapper by nikburnt and specifically simplified the parts required for controlling the X56 LEDs.
The project has since been completely refactored back to C# and modernized for .NET 10 / Windows.
Features
- Simple API for controlling X56 LEDs
- RGB color support
- LED brightness control
- Handles the DirectOutput communication internally
- No manual page creation
- No manual payload creation
- No manual RGB-to-Int32 conversion
- Includes a small demo application
Demo (included)
Requirements
- Saitek / Logitech X56 HOTAS
- Logitech/Saitek DirectOutput driver / SDK providing DirectOutput.dll
Because the wrapper communicates with the native DirectOutput library, it is intended for Windows x64.
Usage
using neXn.X56.DirectOutput;
using X56Device device = new();
if (!device.Open())
{
return;
}
await device.SetLed(DeviceSelection.Both,255, 0, 0, 100);
Setup
Add a reference to neXn.X56.DirectOutput.dll to your project.
Alternatively, add the wrapper project directly as a project reference.
Make sure the required Logitech/Saitek DirectOutput.dll is available to the application at runtime.
A complete example is included in the demo project.
Why This Wrapper?
The native DirectOutput API is relatively low-level for something as simple as changing an LED.
Without a wrapper, applications need to deal with details such as:
- DirectOutput initialization
- Device handling
- Page creation
- LED payloads
- RGB value conversion
- Native API calls
This wrapper handles those details so controlling an LED essentially becomes:
X56.SetLed(device, rgbColor, brightness);
No black magic required.
Technical Details
RGB to Integer32 formula = (256^2* R) + (256* G) + B
Integer32 to RGB:
R = <Integer32>/(256^2)
G = (<Integer32>/256) % 256
R = <Integer32>%256
C++ SetLed index (DirectOutput.dll from SDK) is binary, where 0 is for brightness(max value 100) and 1 for color(int32, max value 16777215[white])
Project History
The project has gone through a slightly unusual evolution:
Original DirectOutput C# Wrapper
↓
X56 Visual Basic Wrapper
↓
Modern C# Wrapper
(.NET 10)
The goal has remained the same throughout: provide the simplest possible way to control the LEDs of the Saitek / Logitech X56 without having to work directly with the DirectOutput API.
Contributing
Contributions are welcome.
Feel free to:
- Report bugs
- Suggest improvements
- Submit pull requests
- Improve X56 device support or documentation
Credits
Based on the original Saitek DirectOutput C# wrapper by nikburnt.
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 85 | 9/17/2026 |