Skip to content

Class InputDevices

Namespace: Apogee.Input
Assembly: Apogee.Input.dll

Feeds an from SDL's keyboard, mouse and gamepad events (through , so create it after ). Gamepads are opened as they are plugged in and let go when they are removed or the window loses focus. While a text field or a panel has the keyboard or the mouse (, ), new presses and the mouse's motion are not routed; releases always are, so nothing stays down.

public sealed class InputDevices : IDisposable

Inheritance

object ← InputDevices

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

InputDevices(InputActionRouter)

public InputDevices(InputActionRouter router)

Parameters

router InputActionRouter

Properties

GamepadCount

How many gamepads are open.

public int GamepadCount { get; }

Property Value

int

KeyboardCaptured

Asked when a key goes down: true while something else (a text box) is typing.

public Func<bool>? KeyboardCaptured { get; set; }

Property Value

Func<bool>?

MouseCaptured

Asked when a mouse button goes down or the mouse moves: true while the pointer is over something else (a panel).

public Func<bool>? MouseCaptured { get; set; }

Property Value

Func<bool>?

Now

The seconds since the program started, which is the clock of the router's times.

public static double Now { get; }

Property Value

double

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()