# Change key binding Enhanced Input at runtime

**URL:** <https://forums.unrealengine.com/t/change-key-binding-enhanced-input-at-runtime/2090723>\
**Category:** Blueprint\
**Tags:** Input, unreal-engine, UE5, Blueprint, question\
**Created:** [October 27, 2024, 1:16pm UTC](https://forums.unrealengine.com/t/change-key-binding-enhanced-input-at-runtime/2090723 "2024-10-27T13:16:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smallgamedevfun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@smallgamedevfun](https://forums.unrealengine.com/u/smallgamedevfun)\
**Post date:** [October 27, 2024, 1:16pm UTC](https://forums.unrealengine.com/t/change-key-binding-enhanced-input-at-runtime/2090723/1 "2024-10-27T13:16:11Z")

</div>

How can you change key binding of a `Enhanced Input` at runtime in blueprints?

What I would like to do is to have a variable `Controlls` (of type `Input Mapping Context`) inside my `User Settings` variable of type `Save Game` that contains all the game settings and it is inside `CustomGameInstance`, and any changes to be applied to that variable and then applied to the controller.

I have a `Input Mapping Context` which contains all the `Input Actions`. I’m giving the user the option to have 2 keys for the same action (for all of them), so for example for moving forward I made two inputs `MoveForward1` / `MoveForward2`. Maybe it is not the recommended way to do it, but I thought it might be easier for me this way. I can change it if there is a way easier/better, it is fine.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/8/978b926c692b56af067dab80c00a3a735835d411.png)

For now I’m using this inside the `Character` blueprint for testing so that the inputs can be used, on `Event BeginPlay` execution line:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/1/5d19ce225008005a0c8e31b5d1df9a7f0087f5b5.png)

But for input of `Mapping Context` I will change it to get the variable from inside `CustomGameInstance` after fully implementing it:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/a/30a7ec0fd3ac3f7563fb03e27eb6cd9c54623616.png)

I postponed implementing a key binding menu for as long as I could but now I have to do this as well.

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [October 27, 2024, 6:17pm UTC](https://forums.unrealengine.com/t/change-key-binding-enhanced-input-at-runtime/2090723/2 "2024-10-27T18:17:35Z")

</div>

Here’s a tutorial on user mappable keybinds:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/1/391d55fe05fdedfa8a446f6a3b5b3647f04d05b9.jpeg "How To Make Player Mappable Input Actions Using Enhanced Input Actions In Unreal Engine 5.1?") ](https://www.youtube.com/watch?v=DI6j2n6uFFw)

And here’s a tutorial on saving & loading the game:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/a/bfa85670044fd09c98c42cbab6db363b3e8aab0c.jpeg "How to Save and Load your Game In Unreal Engine 5 (Easy)") ](https://www.youtube.com/watch?v=14wmGdbhLOA)

I also found one that combines both:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/7/fa7f1fab346ec0b17a76de9e36b7e514a504955d.jpeg " - YouTube") ](https://www.youtube.com/watch?v=sV1X4zXan6M)

Hope these help! 😊

---

<div class="post-metadata">

**Author:** ![smallgamedevfun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@smallgamedevfun](https://forums.unrealengine.com/u/smallgamedevfun)\
**Post date:** [October 28, 2024, 3:00pm UTC](https://forums.unrealengine.com/t/change-key-binding-enhanced-input-at-runtime/2090723/3 "2024-10-28T15:00:49Z")

</div>

Thank you! I found one quite similar to that, but I still watched them, just for the chance they used something not really related to the subject but still useful for me later on.

My main problems was that I didn’t knew about the existence of loop on mappings, after that things went a lot easier, and managed to make a complete widget for all keybindings.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 27, 2024, 3:01pm UTC](https://forums.unrealengine.com/t/change-key-binding-enhanced-input-at-runtime/2090723/4 "2024-11-27T15:01:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
