Skip to content

InputAPI reference

Class InputDeviceInfo

Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input

A connected device as its backend describes it.

C#
public sealed record InputDeviceInfo : IEquatable<InputDeviceInfo>

Inheritance

object ← InputDeviceInfo

Implements

IEquatable<InputDeviceInfo>

Constructors

InputDeviceInfo(DeviceId, DeviceKind, string)

A connected device as its backend describes it.

C#
public InputDeviceInfo(DeviceId Id, DeviceKind Kind, string Name)

Parameters

Id DeviceId

Its id.

Kind DeviceKind

Keyboard, mouse, touch screen, gamepad or other.

Name string

The name the system reports (“Xbox Series X Controller”), or a generic one.

Properties

CanRumble

For gamepads: whether Rumble can do anything on it.

C#
public bool CanRumble { get; init; }

Property Value

bool

Id

Its id.

C#
public DeviceId Id { get; init; }

Property Value

DeviceId

Kind

Keyboard, mouse, touch screen, gamepad or other.

C#
public DeviceKind Kind { get; init; }

Property Value

DeviceKind

Name

The name the system reports (“Xbox Series X Controller”), or a generic one.

C#
public string Name { get; init; }

Property Value

string

PlayerIndex

For gamepads: the player number the system or the pad shows (its LEDs), 0-based, or -1 when it has none.

C#
public int PlayerIndex { get; init; }

Property Value

int

Style

For gamepads: the family whose names its buttons carry (Xbox when unknown).

C#
public GamepadStyle Style { get; init; }

Property Value

GamepadStyle

Methods

<Clone>$()

C#
public InputDeviceInfo <Clone>$()

Returns

InputDeviceInfo

Deconstruct(out DeviceId, out DeviceKind, out string)

C#
public void Deconstruct(out DeviceId Id, out DeviceKind Kind, out string Name)

Parameters

Id DeviceId

Kind DeviceKind

Name string

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(InputDeviceInfo?)

C#
public bool Equals(InputDeviceInfo? other)

Parameters

other InputDeviceInfo?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(InputDeviceInfo?, InputDeviceInfo?)

C#
public static bool operator ==(InputDeviceInfo? left, InputDeviceInfo? right)

Parameters

left InputDeviceInfo?

right InputDeviceInfo?

Returns

bool

operator !=(InputDeviceInfo?, InputDeviceInfo?)

C#
public static bool operator !=(InputDeviceInfo? left, InputDeviceInfo? right)

Parameters

left InputDeviceInfo?

right InputDeviceInfo?

Returns

bool