Use an existing input device to create a layout
To use one of the existing C# InputDevice classes in code to interface with a device, you can build on an existing layout using JSON:
Warning
It looks like the sample you are looking for does not exist.
This example extends the Gamepad layout, but you can extend any existing layout.
You then register your layout with the system and then instantiate it:
Warning
It looks like the sample you are looking for does not exist.