CopperPad 2.0.0-preview.1

This is a prerelease version of CopperPad.
dotnet add package CopperPad --version 2.0.0-preview.1
                    
NuGet\Install-Package CopperPad -Version 2.0.0-preview.1
                    
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="CopperPad" Version="2.0.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CopperPad" Version="2.0.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="CopperPad" />
                    
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 CopperPad --version 2.0.0-preview.1
                    
#r "nuget: CopperPad, 2.0.0-preview.1"
                    
#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 CopperPad@2.0.0-preview.1
                    
#: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=CopperPad&version=2.0.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CopperPad&version=2.0.0-preview.1&prerelease
                    
Install as a Cake Tool

CopperPad

CopperPad is a portable .NET game controller abstraction library. The core package is platform-neutral: applications discover CopperController instances, inspect supported profiles, read CopperControllerSnapshot values, and subscribe to profile/element changes.

Desktop HID support lives in CopperPad.HidSharp. Apple GameController support lives in CopperPad.GameController.

Platform notes

  • Windows 11 HID support depends on how the installed driver exposes a controller. Some Xbox-family devices appear through vendor-specific or XInput paths that are not fully readable as generic HID.
  • macOS USB and Bluetooth HID controllers are supported through CopperPad.HidSharp when the operating system exposes them through readable HID APIs.
  • Linux HID support uses hidraw through HidSharp; users may need udev rules or group permissions for non-root access.
  • iOS support uses Apple's GameController APIs through CopperPad.GameController; validation requires Mac/iOS hardware.

Version 2 provides immutable runtime snapshots, reliable disconnect/reconnect transitions, profile-first mapping, normalization, and app-supplied JSON profile overrides. Rumble/force feedback is intentionally out of scope.

Version 2 migration

Runtime element/profile collections are immutable collections. HID report descriptors and raw reports are exposed as ReadOnlyMemory<byte>; call .Span for inspection or .ToArray() when an owned array is required. Controller profile JSON remains schema version 2.

Quick example

CopperPad contains the provider-neutral host and snapshot API. Add a platform provider such as CopperPad.HidSharp or CopperPad.GameController to discover real devices.

using CopperPad;

IControllerProvider provider = GetPlatformProvider();
using var host = new CopperControllerHost(provider);
host.Start();

foreach (var controller in host.GetControllers())
{
	var snapshot = controller.GetSnapshot();
	Console.WriteLine($"{snapshot.DisplayName}: A={snapshot.A}, LX={snapshot.GetAxis(ControllerElement.LeftStickX):0.00}");
}

Subscribe to element changes when an app wants input updates without polling:

controller.ElementChanged += (_, args) =>
{
	if (args.Element == ControllerElement.South && args.CurrentValue.IsPressed)
	{
		Console.WriteLine("South/A pressed");
	}
};

Controller mappings

CopperPad.HidSharp uses app/user JSON profiles first, then provider-native mappings when available, then a bundled pinned snapshot of SDL_GameControllerDB for common controller mappings, followed by built-in compatibility fallbacks. SDL_GameControllerDB is bundled with the HidSharp provider package as third-party mapping data under the zlib license.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CopperPad:

Package Downloads
CopperPad.HidSharp

Desktop HidSharp controller provider for CopperPad, including SDL_GameControllerDB mappings.

CopperPad.GameController

Apple GameController provider for CopperPad. The iOS target is enabled with EnableIOSProviderBuild=true on a Mac with the iOS workload installed.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.1 83 7/12/2026