> For the complete documentation index, see [llms.txt](https://lados-organization.gitbook.io/goku/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lados-organization.gitbook.io/goku/goku-game-engine_es/capitulo-17-manejo-de-la-entrada-del-usuario.md).

# Capítulo 17: Manejo de la Entrada del Usuario

Este capítulo cubre el diseño e implementación de un sistema que procesa la entrada del usuario para interactuar con su juego. Nuestra clase de control de entrada (`InputHandler`) es responsable de capturar y mantener el estado de las entradas. Maneja la entrada del teclado y el mouse, e incluso la entrada del controlador de juegos.&#x20;

Primero inicializa un `EventPump` para procesar eventos y un controlador de juegos si lo hay. Lleva un registro de las teclas que están actualmente presionadas y el estado del mouse, incluida la posición y si se presiona el botón izquierdo. Puede proporcionar el estado actual de una tecla o un botón del controlador, el estado del botón del mouse y la posición, y obtener eventos que han ocurrido.


---

# 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://lados-organization.gitbook.io/goku/goku-game-engine_es/capitulo-17-manejo-de-la-entrada-del-usuario.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.
