This is a speculative bug report from the user.
The fix for this is to re-do the work of 31224705 but in a better way. The "bShouldBeIgnored" flag is being overriden by the previous mapping's value every time
31224705 caused [Link Removed], which resulted in me just backing out that change.
We should:
See also [Link Removed]
Create two binary (digital) input actions, and put them in two separate input mapping contexts (IMC_A and IMC_B)
Create 2 pawns with the enhanced input set-up on them.
Have Pawn 1 set up with some logic to change the players possessed pawn to Pawn 2 when a binary input (B) has been held for a short amount of time.
Have Pawn 2 set up to debug print ( or do something ) when the same input (B) is pressed. This is 2 separate input actions ( one for press and one for hold ) but both mapped to the same buttons.
In our case the input actions are set up in 2 different Input Mapping Contexts. When the possession changes we remove the IMC with the input configured for Pawn 1, and push the IMC with the input configured for Pawn 2.
Ensure that when the IMC's are being pushed the 'bIgnoreAllPressedKeysUntilReleaseOnRebuild' is set to true.
Ensure the input is set up as a binary input.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-295787 in the post.