# Does anybody know why when removing and adding an input mapping context on toggle its triggering the key im holding down?

**URL:** <https://forums.unrealengine.com/t/does-anybody-know-why-when-removing-and-adding-an-input-mapping-context-on-toggle-its-triggering-the-key-im-holding-down/2702817>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [February 28, 2026, 5:06am UTC](https://forums.unrealengine.com/t/does-anybody-know-why-when-removing-and-adding-an-input-mapping-context-on-toggle-its-triggering-the-key-im-holding-down/2702817 "2026-02-28T05:06:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![szvula](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@szvula](https://forums.unrealengine.com/u/szvula)\
**Post date:** [February 28, 2026, 8:37pm UTC](https://forums.unrealengine.com/t/does-anybody-know-why-when-removing-and-adding-an-input-mapping-context-on-toggle-its-triggering-the-key-im-holding-down/2702817/2 "2026-02-28T20:37:49Z")

</div>

> [@IMC Input Triggers Reset When Mapping Context Added or Removed](https://forums.unrealengine.com/t/imc-input-triggers-reset-when-mapping-context-added-or-removed/2699855/3):
>
> Hey there,
> 
> The original bug UE-270589 is an issue where if somehow changed the modifier/triggers on a key mapping (for example, adding a higher priority mapping context with a mapping to the same input action, but different modifier values) then we want to maintain the state of the trigger or modifiers, since the input action itself is still being used. We actually had a live example of this in the Lyra sample project with the “ADS” (Aim down sights) input action. When scoped in, we wanted a lower aim sensitivity applied via input modifier, which was not working.
> 
> You point out an interesting edge case here. The additional “Add Mapping Context” call triggers a call to `IEnhancedInputSubsystemInterface::ReorderMappings`, which is where we are retaining the trigger state if needed, which is correct. The issue appears because the ActionInstanceData for that data is cleared though, so on the next tick it will re-evaluate the trigger state and fire the “triggered” event again.
> 
> I have filed [UE-361208](https://issues.unrealengine.com/issue/UE-361208) which you can use for tracking of this issue once it goes public.
> 
> For now, I would say that using that CVar set to false is a fine work around if you don’t need this behavior. Otherwise, you could first check if the IMC is already applied before calling add a second time if your gameplay code depends on this logic, and that should prevent the additional call to ReorderMappings. You can do this with a call to IEnhancedInputSubsystemInterface::HasMappingContext.
> 
> I hope that helps,
> 
> Ben

yeah if anyone knows how I can do whatever he just said that would be greatly appreciated 😆

---

_[View the full topic](https://forums.unrealengine.com/t/does-anybody-know-why-when-removing-and-adding-an-input-mapping-context-on-toggle-its-triggering-the-key-im-holding-down/2702817)._
