neXn.SteamController2026.SDL3
1.0.1
dotnet add package neXn.SteamController2026.SDL3 --version 1.0.1
NuGet\Install-Package neXn.SteamController2026.SDL3 -Version 1.0.1
<PackageReference Include="neXn.SteamController2026.SDL3" Version="1.0.1" />
<PackageVersion Include="neXn.SteamController2026.SDL3" Version="1.0.1" />
<PackageReference Include="neXn.SteamController2026.SDL3" />
paket add neXn.SteamController2026.SDL3 --version 1.0.1
#r "nuget: neXn.SteamController2026.SDL3, 1.0.1"
#:package neXn.SteamController2026.SDL3@1.0.1
#addin nuget:?package=neXn.SteamController2026.SDL3&version=1.0.1
#tool nuget:?package=neXn.SteamController2026.SDL3&version=1.0.1
neXn.SteamController2026.SDL3
A lightweight .NET library for detecting the 2026 Steam Controller and reading its battery percentage and power state through SDL3.
Supports USB, Bluetooth, Proteus wireless puck, and Nereid wireless puck connections.
Features
- Detects the Steam Controller 2026
- Reads the current battery percentage
- Reads the current power state
OnBatteryChargingChargedUnknownDisconnected
- Automatic controller discovery through SDL3
- Handles controller disconnects and reconnects
- Supports the known 2026 Steam Controller connection variants:
- USB
- Bluetooth
- Proteus wireless puck
- Nereid wireless puck
- Handles the controller's delayed initial battery report
- Thread-safe status queries
- Supports
CancellationToken - Implements both
IDisposableandIAsyncDisposable - Optional
Microsoft.Extensions.Loggingintegration - Small API surface with SDL-specific implementation details hidden from consumers
Usage
using neXn.SteamController2026.SDL3;
await using SteamControllerClient controller = new();
if (!controller.Initialize())
{
Console.WriteLine("SDL3 could not be initialized.");
return;
}
SteamControllerStatus status = await controller.GetStatusAsync();
if (!status.IsConnected)
{
Console.WriteLine("Steam Controller is disconnected.");
return;
}
Console.WriteLine($"Battery: {status.BatteryPercentage}%");
Console.WriteLine($"Power state: {status.PowerState}");
Example outputs:
Battery: 82%
Power state: OnBattery
Battery: 64%
Power state: Charging
Initialization
SDL's gamepad subsystem must be initialized before requesting controller data:
SteamControllerClient controller = new();
bool initialized = controller.Initialize();
Initialize() should be called from the application's main thread.
After initialization, GetStatusAsync() can be used for asynchronous battery polling.
Calling GetStatusAsync() before Initialize() results in an
InvalidOperationException.
Battery reporting
The 2026 Steam Controller does not necessarily report its battery state immediately after being connected.
SDL may initially report:
PowerState: Unknown
BatteryPercentage: -1
The controller eventually sends its battery telemetry and SDL caches the result.
SteamControllerClient handles this automatically by retrying the battery
query for a limited period.
Retries = 50;
DelayBeforeRetry = 250;
These values can be changed:
SteamControllerClient controller = new()
{
Retries = 60,
DelayBeforeRetry = 300
};
Once SDL has received a valid battery report, subsequent calls normally return immediately.
Supported connections
The library recognizes the known 2026 Steam Controller device IDs:
| Connection | Vendor ID | Product ID |
|---|---|---|
| USB | 0x28DE | 0x1302 |
| Bluetooth | 0x28DE | 0x1303 |
| Proteus wireless puck | 0x28DE | 0x1304 |
| Nereid wireless puck | 0x28DE | 0x1305 |
SDL3
This library uses SDL3 for controller discovery and battery-state reporting.
SDL handles the device-specific HID communication and exposes the battery information through its gamepad API.
Conceptually:
Steam Controller 2026
│
▼
USB / Bluetooth / Wireless Puck
│
▼
SDL3
│
▼
SDL3-CS
│
▼
neXn.SteamController2026.SDL3
│
▼
Your .NET application
License
This project is licensed under the MIT License.
Disclaimer
This is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Valve Corporation. Steam and Steam Controller are trademarks of their respective owner.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- SDL3-CS (>= 3.4.16)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.