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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="neXn.X56.DirectOutput" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="neXn.X56.DirectOutput" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="neXn.X56.DirectOutput" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add neXn.X56.DirectOutput --version 2.1.0
                    
#r "nuget: neXn.X56.DirectOutput, 2.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package neXn.X56.DirectOutput@2.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=neXn.X56.DirectOutput&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=neXn.X56.DirectOutput&version=2.1.0
                    
Install as a Cake Tool

Saitek/Logitech X56 - DirectOutput LED Wrapper

NuGet NuGet Downloads .NET Platform License Last Commit GitHub Release

"Buy Me A Coffee"

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)

Screenshot

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.

"Buy Me A Coffee"

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 86 9/17/2026