Description

This is an issue related to the behavior of the FlushPressedKeys function when called manually while a button is held. Once the function is called in C++, a Pressed event gets triggered even though the button has not been released or pressed again.

There is a proposed fix for this issue in 5.5 branch in the following commit: https://github.com/EpicGames/UnrealEngine/commit/21c4bc9e0e1d2b6c6d0c32a1da1cbd22fb5bad96#diff-0e7c749f914cc6796cc6a13891c5a3e7a4eb0938d4246f0bb1407e3b52790470R350

However, cherry-picking this change into 5.3 or 5.4 does not fix the issue entirely because the Pressed event is now triggered randomly.

Steps to Reproduce

1. Create a project using FPS template
2. Create two input actions.
3. One input action has a Hold Trigger and is one shot.
4. The other input action has a Pressed Trigger.
5. In the mapping context assign both input actions to the same button.
6. In the handler for the Hold Input Action triggered event, call the FlushPressedKeys function.
7. Run PIE, press and hold the button assigned.
7. After FlushPressedKeys is called, the Pressed event gets triggered again unexpectedly.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-226396 in the post.

3
Login to Vote

Unresolved
ComponentUE - Gameplay - Input
Affects Versions5.45.3
Target Fix5.6
CreatedOct 2, 2024
UpdatedOct 17, 2024
View Jira Issue