I thought you could manually add/remove inputs from the input queue, but after investigating for a bit, it isn’t a good practice at all if that would be the case. For this, it looks like you need a Input Mapping Context more info here
- Input Mapping Contexts map user inputs to Actions and can be dynamically added, removed, or prioritized for each user. You can apply one or more Contexts to a local player through its Enhanced Input Local Player Subsystem, and prioritize them to resolve collisions between multiple actions trying to consume the same input. A common example of this might be a single button that can open doors while the character is walking around in the world, or select an item while looking through the character’s backpack. Whenever the character opens the backpack, you could add a “select item” Input Mapping Context that out-prioritizes the “open door” context, and then remove the “select item” context when the character closes the backpack. This would ensure that the user’s inputs will be interpreted correctly based on the character’s situation, and prevent the need to program code at the input-handling level with awareness of the door and backpack systems. Modifiers adjust the value of raw input coming from the user’s devices. An Input Mapping Context can have any number of modifiers associated with each raw input for an Input Action. Common Modifiers including dead zones, input smoothing over multiple frames, conversion of input vectors from local to world space, and several others are included in the plugin; developers can also create their own Modifiers.