# Enhanced Input - Remapping delete Triggers, Modifiers, action, etc...

**URL:** <https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165>\
**Category:** Blueprint\
**Tags:** Input, unreal-engine, Blueprint, question\
**Created:** [July 27, 2023, 12:10am UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165 "2023-07-27T00:10:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bugzi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bugzi](https://forums.unrealengine.com/u/Bugzi)\
**Post date:** [July 27, 2023, 12:10am UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/1 "2023-07-27T00:10:35Z")

</div>

Hello,

I’m currently stuck with remapping…

The WB works perfectly it display the name and the InputKeySelector and it update the key properly, but I can’t find a way to have the triggers, modifiers, action, etc… to be transferred to the new mapping…

Anyone can tell what I’m I doing wrong?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/0/3c061c91257ca65f9a68b5ecc901898385e11398.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/f/1efb3bf549666adbff172f31e29ddad4a9e42d26.png)

---

<div class="post-metadata">

**Author:** ![Jairientrouve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jairientrouve/32/901345_2.png) [@Jairientrouve](https://forums.unrealengine.com/u/Jairientrouve)\
**Post date:** [October 6, 2023, 4:11pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/2 "2023-10-06T16:11:15Z")

</div>

Hi, I’m currently having the same problem in ue5.3. did you happen to find a solution ?

---

<div class="post-metadata">

**Author:** ![hotinnards](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hotinnards/32/1049084_2.png) [@hotinnards](https://forums.unrealengine.com/u/hotinnards)\
**Post date:** [October 6, 2023, 5:49pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/3 "2023-10-06T17:49:49Z")

</div>

This [documentation](https://docs.unrealengine.com/5.2/en-US/using-commonui-with-enhnaced-input-in-unreal-engine/) regarding Common UI and EnhancedInput may help. See section 3 which references specifying a metadata asset that implements the `ICommonMappingContextMetadataInterface`.

Have you set the metadata property for your input action(s)? Perhaps that’s what you’re missing.

 ![MappingMetadata](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/b/58b32dcdebe5204b4426682dcc3f32cc6f3a1f8d.jpeg)

---

<div class="post-metadata">

**Author:** ![Jairientrouve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jairientrouve/32/901345_2.png) [@Jairientrouve](https://forums.unrealengine.com/u/Jairientrouve)\
**Post date:** [October 6, 2023, 7:53pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/4 "2023-10-06T19:53:02Z")

</div>

Thanks for the reply, i did as followed in the doc but it’s still not working for me at least. My bp is a bit different though.

 ![Capture d’écran 2023-10-06 214440](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/6/03666ca19a5b7c5b40e04fd7b1d322b55060e8cf.png)  
The print even show the new key but when i go to the input mapping context the key is the same as before. I thought it would be more efficient to use the set members node instead of unmapping and mapping the keys but i don’t think the node is supposed to be used like that ^^

---

<div class="post-metadata">

**Author:** ![hotinnards](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hotinnards/32/1049084_2.png) [@hotinnards](https://forums.unrealengine.com/u/hotinnards)\
**Post date:** [October 6, 2023, 9:05pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/5 "2023-10-06T21:05:34Z")

</div>

So the input mapping doesn’t appear to update even though you are setting the struct variables by ref.

> The print even show the new key but when i go to the input mapping context the key is the same as before

Do you mean in the editor or when you read back the input mapping’s values at runtime?

> I thought it would be more efficient to use the set members node instead of unmapping and mapping the keys

I see where you’re coming from but the unmapping and mapping approach sounds sensible to me (if it works).

Have you tried this interface call using the input subsystem? It’s more specific to the player’s copy of the mapping, looks like you’re reading from the “default” mapping so you don’t see the player’s updated binding.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/b/62b7f5e3a8d238cb0b5e644ef93dffdb771dffe7.png)

Source from `EnhancedPlayerInput.h`

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/c/61ca7083a5a85e4048d63eae73406f86609598e9.png)

---

<div class="post-metadata">

**Author:** ![Jairientrouve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jairientrouve/32/901345_2.png) [@Jairientrouve](https://forums.unrealengine.com/u/Jairientrouve)\
**Post date:** [October 6, 2023, 9:48pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/6 "2023-10-06T21:48:44Z")

</div>

> Do you mean in the editor or when you read back the input mapping’s values at runtime?

Both in the output log and at runtime

> I see where you’re coming from but the unmapping and mapping approach sounds sensible to me (if it works).

That was my first approach and the one i usually used before ue5.3 but it didn’t work either. After that i tried to map the new key then set the struct of the key with the old key then unmap the old key but it didn’t work too.  
I went from ue5 to ue5.3 directly so i’m very new to this enhanced input system.

> Have you tried this interface call using the input subsystem?

This is the closest thing i found to what you have. I tried with that and it still doesn’t work

 ![Capture d’écran 2023-10-06 233405](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/b/44b338e4353dc307274c33098e1bb4a84a57324c.png)

Sorry, it seems i’m not very good at this ^^

---

<div class="post-metadata">

**Author:** ![hotinnards](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hotinnards/32/1049084_2.png) [@hotinnards](https://forums.unrealengine.com/u/hotinnards)\
**Post date:** [October 6, 2023, 10:20pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/7 "2023-10-06T22:20:58Z")

</div>

No need to apologise 🙂

That’s essentially what I showed above, though I am using version 5.2 at the moment so perhaps there’s been some changes in 5.3.

Are you calling unmap at the end? You’d want to call that first to unmap the old key, then map the new one.

Here’s an example that’s working for me, I can see the binding is updated in editor view as well, so it must be updating a config file to read the value back.

`UnmapAllKeysFromAction` may not be desirable either, I just used it here for the example. You may want to stick with `UnmapKey` for more control on what’s removed.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/0/de02dac2e2bc4838bb4b0f3195c3e4443c43e2e4.png)

---

<div class="post-metadata">

**Author:** ![hotinnards](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hotinnards/32/1049084_2.png) [@hotinnards](https://forums.unrealengine.com/u/hotinnards)\
**Post date:** [October 6, 2023, 10:27pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/8 "2023-10-06T22:27:54Z")

</div>

> but I can’t find a way to have the triggers, modifiers, action, etc… to be transferred to the new mapping

@Bugzi Are you putting your triggers, modifiers etc. in the Input Action itself? That way, everything should stay the same even with a new button mapping.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/e/c6e20a502f8787f5bf0caef0047d86d63e545a07.png)

---

<div class="post-metadata">

**Author:** ![Jairientrouve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jairientrouve/32/901345_2.png) [@Jairientrouve](https://forums.unrealengine.com/u/Jairientrouve)\
**Post date:** [October 7, 2023, 9:29am UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/9 "2023-10-07T09:29:47Z")

</div>

Yeah that’s the one i used first and it work fine as long as there’s no modifiers to add. But for the move input there’s a different modifier for each keys, that’s why i want to transfer them to the new keys

Here’s what it look like in the input mapping context:

 ![Capture d’écran 2023-10-07 112144](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/a/59a8a9c1a686725fc497071534efbcf4d6cd7ba4.png)

The only option that would work for me is to have 4 differents input action for each direction and set the different modifers directly in them, but that wouldn’t be very optimised. That’s why i’m looking for a way to transfer those modifiers inside the input mapping context like the OP

---

<div class="post-metadata">

**Author:** ![Jairientrouve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jairientrouve/32/901345_2.png) [@Jairientrouve](https://forums.unrealengine.com/u/Jairientrouve)\
**Post date:** [October 8, 2023, 9:54am UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/10 "2023-10-08T09:54:53Z")

</div>

Okay so i almost resolved the original issue of the post with this:

 ![Capture d’écran 2023-10-08 113114](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/3/e9384494caddcb26ab5f3e935686f44e7b7c8217.png)  
instead of unmapping and mapping i just changed the key using the set members node.  
The IMC node is a reference to the Input mapping context (make sure the get node is a ref not copy or it doesn’t work). And the forward settings node is a reference to the enhanced action key mapping of the forward key i set up during event construct like this:  
 ![Capture d’écran 2023-10-08 114101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/6/b062970728a180270a21f24cf3f5327f98897f53.png)

The key is changed and it keep all triggers and modifiers i can see it in the input mapping context when i change it during play in editor but the problem is that the old key is still in effect until i stop and relauch the game in editor (ex: the old key is W and set the new to T, the key displayed in the input mapping context is T but i still move in game with W)

---

<div class="post-metadata">

**Author:** ![hotinnards](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hotinnards/32/1049084_2.png) [@hotinnards](https://forums.unrealengine.com/u/hotinnards)\
**Post date:** [October 8, 2023, 2:57pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/11 "2023-10-08T14:57:35Z")

</div>

Nice one 😄

Does calling UnmapKey after set members work? As in call UnmapKey for the W input once it has been reassigned to T?

If not, maybe you need to force a rebuild/refresh of the mapping with a flush.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/2/5223646a86f6cf659bb09e07e40ec4aefa4c9ec3.png)

---

<div class="post-metadata">

**Author:** ![Jairientrouve](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jairientrouve/32/901345_2.png) [@Jairientrouve](https://forums.unrealengine.com/u/Jairientrouve)\
**Post date:** [October 9, 2023, 12:42pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/12 "2023-10-09T12:42:47Z")

</div>

> If not, maybe you need to force a rebuild/refresh of the mapping with a flush.

Yessss it finally work ! I’ve been stuck on this for 4 days ^^  
I just added the request rebuild control mappings node at the end of the remapping code and it worked. That was the node i was missing thanks for the help.

And i guess it also answer the original problem of the post, the difference is that he unmap the old key then map the new then pass the modifiers and all to the new key. And i’m just replacing the key from the mapping with the new one.

Should i make a big reply to resume how to do it both way so that it can be flag as the solution or let future readers look through all the comments ?

---

<div class="post-metadata">

**Author:** ![hotinnards](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hotinnards/32/1049084_2.png) [@hotinnards](https://forums.unrealengine.com/u/hotinnards)\
**Post date:** [October 18, 2023, 10:52am UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/13 "2023-10-18T10:52:52Z")

</div>

Great, happy to help.

In regards to a summary post, I think it’s ok to leave as is since there isn’t a sea of comments to wade through.

Hopefully @Bugzi can mark it as resolved.

---

<div class="post-metadata">

**Author:** ![Bugzi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bugzi](https://forums.unrealengine.com/u/Bugzi)\
**Post date:** [October 24, 2023, 4:43pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/14 "2023-10-24T16:43:07Z")

</div>

@hotinnards @Jairientrouve OMG Thanks guys !! I had lost hope for this one, good thing I came back to check! 🥰

---

<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 23, 2023, 4:43pm UTC](https://forums.unrealengine.com/t/enhanced-input-remapping-delete-triggers-modifiers-action-etc/1241165/15 "2023-11-23T16:43:25Z")

</div>

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