szvula
(szvu)
February 28, 2026, 5:06am
1
Im looking at similar questions and I think someone mentioned that its happening when theyre holding down a button (same thing is happening to me) they said that removing and adding the imc is possibly triggering the enhanced IA that is being held.
For context I have a double tap sprint where if i press a movement key like w in quick succession then i sprint, and when i remove and add the IMC in quick succession then it also automatically sprints.
so i guess i know the problem but does anybody know how I can avoid it doing that?
szvula
(szvu)
February 28, 2026, 8:37pm
2
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 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