> For the complete documentation index, see [llms.txt](https://docs.otherside.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherside.xyz/odk-docs/odk-plugin/odk-input-management/input-component.md).

# Input Component

`BPC_ODK_InputComponent` is the main manager of input in the ODK. This component lives on the `BP_ODK_PlayerControllerBase` asset.

Enabling and disabling IMCs\
`BPC_ODK_InputComponent` can be used to control which IMCs are active. `BPC_ODK_InputComponent` uses a stack of states where each state contains a set of IMCs. When a state is active, all enabled IMCs are disabled and all IMCs on the newly enalbed state are enabled.\
\
`PushInputMappingContextState` - can be used to add an new state to the stack. This state will become active.\
`RemoveInputMappingContextFromState` - can be used remove a state from the stack. The previous state in the stack will become active.\
`AddInputMappingContextToState` - can be used to add an additional IMC to an existing state. If the state is active, the IMC will be enabled.\
`RemoveInputMappingContextFromState` - can be used to remove an IMC to an existing state. If the state is active, the IMC will be disabled.

\
Getting the last input type\
`BPC_ODK_InputComponent` can be used to get the last input state (Gamepad/Keyboard) by calling `GetLastInputType` or hooking into the event `OnInputTypeUpdated`.

{% hint style="info" %}
Note, there exists a "On Posses Input Mapping Contexts" on the base `BP_ODK_PlayerCharacterBase` . Please do not use this config. It won't work within the ODK and will be removed in a future iteration.

<img src="/files/r9bidLD2M2i0O5E8RW6E" alt="" data-size="original">
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherside.xyz/odk-docs/odk-plugin/odk-input-management/input-component.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
