> For the complete documentation index, see [llms.txt](https://travljen.gitbook.io/unit-selection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://travljen.gitbook.io/unit-selection/how-it-works/input-controls.md).

# Input Controls

Learn how the input events are handled by the selection system.

The input control component is responsible for observing changes in the input system, invoking public Actions and updating it's state to reflect the input.

## Supported components

For general use purposes there are two components provided by the package, one for the old input and one for the new input system.

* **InputActionsControl:** This component is responsible for managing the new Input System interface
* **InputKeysControl:** This component is responsible for managing the old Input interface

## Customisation

Like everything in this package, you can implement your own input component with <mark style="color:blue;">**IInputControl**</mark> interface, or extend your existing component with this interface.

```csharp
public interface IInputControl
{
    public Action OnCancelTriggered { get; set; }
    public Action OnMouseDown { get; set; }
    public Action OnMouseUp { get; set; }
    public Vector3 MousePosition { get; }
    public Action<int> OnQuickSelectionToggle { get; set; }
    public bool IsMultiClickSelectionPressed { get; }
    public bool IsQuickSavePressed { get; }
}
```

**Note:** Additionally <mark style="color:blue;">**AInputControl**</mark> is available, which is an abstract class implementing <mark style="color:blue;">**IInputControl**</mark>, primarily as a convenience for connecting input reference through Unity's Editor and may be used instead of <mark style="color:blue;">**IInputControl**</mark>.
