# \[solved (sweat & shame)\] What is « mapper » for configuring game input bindings?

**URL:** <https://forum.defold.com/t/solved-sweat-shame-what-is-mapper-for-configuring-game-input-bindings/73763>\
**Category:** Questions\
**Created:** [August 6, 2023, 6:07pm UTC](https://forum.defold.com/t/solved-sweat-shame-what-is-mapper-for-configuring-game-input-bindings/73763 "2023-08-06T18:07:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubixpix](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/cubixpix/32/7177_2.png) [@cubixpix](https://forum.defold.com/u/cubixpix)\
**Post date:** [August 6, 2023, 6:07pm UTC](https://forum.defold.com/t/solved-sweat-shame-what-is-mapper-for-configuring-game-input-bindings/73763/1 "2023-08-06T18:07:54Z")

</div>

Hello,

Searching how i could remap inputs for player, i was thinking first of this:  
filling _game.input\_binding_ with all possible values. Then the player could chose in a menu which key he wants for an action, and in `on_input` i could test the stored value.

Reading the forum, i landed on this page:

> <https://github.com/britzl/defold-input/blob/master/in/mapper.md>

It seems less overkill (avoid to send a message to `on_input` for each pressed key), but i have questions:

The web page above says: _The [all.input\_bindings](https://github.com/britzl/defold-input/blob/master/in/in/bindings/all-input_bindings) does this and it’s recommended to use this file_ , but the link it gives is dead.

Then i see it’s on Britzl github, so this method is not integrated in the Defold’s engine, isn’t it ?

What is **in** named directory given in the sample ? Is it part of Defold sources ? Is it usable directly from a lua script in Defold ? Should it be copied somewhere in the project path before ?

(i’m speaking of this) :

```lua
local mapper = require "in.mapper"
local triggers = require "in.triggers"

```

Thank you.

---

<div class="post-metadata">

**Author:** ![Potota](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/potota/32/33404_2.png) [@Potota](https://forum.defold.com/u/Potota)\
**Post date:** [August 6, 2023, 9:27pm UTC](https://forum.defold.com/t/solved-sweat-shame-what-is-mapper-for-configuring-game-input-bindings/73763/2 "2023-08-06T21:27:58Z")

</div>

> [@cubixpix](#):
>
> The web page above says: _The [all.input\_bindings](https://github.com/britzl/defold-input/blob/master/in/in/bindings/all-input_bindings) does this and it’s recommended to use this file_ , but the link it gives is dead.

That file is now bundled with Defold at `/builtins/input/all.input_binding`.

> [@cubixpix](#):
>
> What is **in** named directory given in the sample ? Is it part of Defold sources ? Is it usable directly from a lua script in Defold ? Should it be copied somewhere in the project path before ?

The repository is for the defold-input library which provides the `in` folder once you follow the directions in the README to add it to your project:

> [@](#):
>
> ## Setup
> 
> You can use the extension in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:
> 
> [https://github.com/britzl/defold-input/archive/master.zip](https://github.com/britzl/defold-input/archive/master.zip)
> 
> Or point to the ZIP file of a [specific release](https://github.com/britzl/defold-input/releases).

---

<div class="post-metadata">

**Author:** ![cubixpix](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/cubixpix/32/7177_2.png) [@cubixpix](https://forum.defold.com/u/cubixpix)\
**Post date:** [August 7, 2023, 9:32am UTC](https://forum.defold.com/t/solved-sweat-shame-what-is-mapper-for-configuring-game-input-bindings/73763/3 "2023-08-07T09:32:29Z")

</div>

Believe me if you want , but i didn’t even thought on going back at the root of the project ( [GitHub - britzl/defold-input: Simplify input related operations such as gesture detection, input mapping and clicking/dragging game objects · GitHub](https://github.com/britzl/defold-input/tree/master) ).

I was 100% sure to be lost somewhere in the sources of Defold…

thank you.
