Version:

IN THIS ARTICLE

Input

Input

You can use the Input component to bind raw input to events in your game. The Input component references an .inputbindings file, which binds a set of inputs (such as from a mouse, keyboard, game controller, and so on) to an event.

For example, you can add the Input component to an entity and specify in the .inputbindings file that when you press the keyboard spacebar, the entity rotates.

Note
To work with inputs, you must enable the Input Management Framework and the Starting Point Input gems. For more information, see Add modular features and assets with Gems.

Topics

Input Properties

[]

The Input component has the following properties.


NameDescription
Input to event bindingsReferences an .inputbindings file that defines the bindings of raw input to events.
Input contextsA string to specify valid context(s) for the .inputbindings file. An empty string "" is the default context. This context is active whenever it’s explicitly pushed to the top of the input context stack, or when the input context stack is empty. You can use this parameter to specify what context asset binding is available for the component. This is useful if you want the component to switch between different input events. For an example of working with contexts, see Input Request Bus. Input event bus (EBus) messages aren’t generated while the Console window is open.