• Home
  • Blog
  • Docs
  • GitHub
Show / Hide Table of Contents

Namespace Snowflake.Input.Device

Classes

DefaultDeviceCapabilityLabels

Implements a default label mapping using the name of the capability enum element.

DeviceCapabilityClasses

Helper methods for device capability classes

DeviceCapabilityExtensions

Extensions to DeviceCapability

DeviceLayoutMapping

DictionaryDeviceCapabilityLabels

Implements a label mapping using a backing dictionary. Missing labels are replaced with the empty string.

DirectInputDeviceInstance

KeyboardDeviceInstance

PassthroughDeviceInstance

XInputDeviceInstance

Interfaces

IDeviceCapabilityLabels

Represents a mapping from DeviceCapability to a label on the real device. When enumerated,

IDeviceLayoutMapping

Represents a map from a ControllerElement to a DeviceCapability

IInputDevice

Represents the physical instance of a hardware peripheral agnostic of any input API. That is to mean that one device may implement multiple device APIs (driver instances).

IInputDeviceInstance

Represents an instance of a device with regards to a specific input driver.

Enums

DeviceCapability

Possible capabilities of a hardware device.

This differs from ControllerElement in semantics; whereas ControllerElement semantics are derived from the Stone controller layout specification, DeviceCapability enumerations semantics come from the IInputDeviceInstance for which these capabilities were instantiated.

These capabilities more or less mirror the union of possible capabilities provided by DirectInput, XInput, and evdev. Hence the semantics of each enum differ depending on the driver from which the instance was enumerated from.

However, Snowflake only supports unique mappings up to the set defined by Stone, so in practice, the full set of capabilities will not be able to be mapped to a controller.

Button0 and such do not necessary map directly to Button0. Commonly, Button0 map instead map to ButtonA and such, depending on the driver.

Axes have entries that are triplicated with the following semantics.

* Positive means the partition of the axis from 0.50 to 1.00, mapped to the interval [0, 1], that is 0 approaches 1 as 0.50 approaches 0.

* Negative means the partition of the axis from 0.00 to 0.50, mapped to the interval [-1, 0], that is, 0 approaches -1 as 0.50 approaches 0.00

* Without either qualifier means the entire axis from 0.00 to 1.00, mapped to the interval [-1, 1], that is -1 approaches 1 as 0.00 approaches 1.00.

An enumerated axis enumerated may have all three capabilities enumerated, particularly if it is an analog stick. Some drivers may not have support for all three capabilities, such as XInput triggers only exposing [0.00, 1.00] for triggers.

Mouse cursor capabilities are also triplicated with the same semantics as axis, except for absolute values. Relative mouse movement is mapped to Axis0 by convention.

DeviceCapabilityClass

Classes of device capabilities

InputDriver

The input driver for a IInputDeviceInstance.

Built with ❤️ by @chyyran. Text content licensed under CC-BY-SA 4.0.