Skip to content

Namespace Apogee.Input

Classes

InputAction

One action the player can bind: where it works (its contexts) and what it is bound to (its defaults until the player rebinds it).

InputActionMap

Every action the player can bind, where each works (its contexts) and what it is bound to. Contexts are names the game chooses (world, on_foot, vehicle, menu); situations say which are active together, so two actions that can never be active at once may share an input. A turns the player's input into these actions.

InputActionRouter

Turns the player's input into the actions of an that fire in the active contexts, and says how far analog actions are pushed. Of the bindings on an input whose modifiers are all held, the one with the most modifiers wins, so Shift+Tab isn't also Tab, and a key still fires while running with Shift. A key with a hold binding fires its press on a quick release instead; a key with a double tap waits a moment for the second tap before firing its press. feeds it from SDL; , , and feed it by hand, with explicit times (seconds, any origin), for tests and replays. Call once a frame to raise , and after the frame's logic ran.

InputDevices

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.

KeyNames

The names keys go by in bindings. They name the physical key by its place on a US QWERTY keyboard (SDL's scancodes), so a binding means the same place on every layout. The left and right Ctrl, Shift, Alt and Meta share a name.

Structs

Binding

What an action is bound to, in the text form players edit: [Hold |Double ][Ctrl+][Shift+][Alt+]input. Keys go by their position on a US QWERTY keyboard (W, Tab, F1, BracketLeft…: ), so AZERTY players get ZQSD for WASD; mouse inputs are Mouse Left, Mouse Right, Mouse Middle, Mouse Wheel Up, Mouse Wheel Down, Mouse Back, Mouse Forward and the motion Mouse X- … Mouse Y+; gamepad inputs are Joy A … Joy Right (Xbox names), the sticks Joy LX- … Joy RY+ (Y+ is down) and the triggers Joy LT, Joy RT. Names are case-insensitive when read and written the way this lists them.

BindingConflict

Two actions that can be active together and are bound to the same input.

Enums

InputDevice

Modifiers

Keys held with an input: Ctrl+Shift+L.

Trigger

How an input fires an action: when it is pressed (or quickly released, if the same input also has a hold), when it has been held, or on its second tap.