godot icon indicating copy to clipboard operation
godot copied to clipboard

`Input.parse_input_event` releases all other pressed actions

Open mosquitochang opened this issue 6 months ago • 0 comments

Tested versions

  • Reproducible in: 4.3.stable, 4.3.beta1
  • Not reproducible in:
    • 4.3.dev6, 4.2.1 (can't really test it because Input.parse_input_event was broken, see #85984)
    • 4.1.3 (working as expected)

System information

Godot v4.3.stable - macOS 14.6.0 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (10 Threads)

Issue description

When using Input.parse_input_event to trigger an action, it releases all other pressed actions.

This issue occurs since Input.parse_input_event got fixed by #86010, but I'm not sure if it is the root cause or not.

Steps to reproduce

func _ready():
    await get_tree().create_timer(1).timeout
    Input.action_press("ui_a")
    Input.action_press("ui_b")
    Input.action_press("ui_c")
    await get_tree().create_timer(1).timeout
    var event = InputEventAction.new()
    event.action = "ui_d"
    event.pressed = true
    Input.parse_input_event(event)

In this example, we press three actions using Input.action_press, and then use Input.parse_input_event to press the fourth action. As the video shows, it released all other actions.

https://github.com/user-attachments/assets/4e2b4e55-176f-48b1-8bdc-68c1a515704d

Using the MRP below, you can also use the keyboard to test, the "a" and "b" keys using Input.action_press, "c" and "d" keys using Input.parse_input_event.

Minimal reproduction project (MRP)

4.3-parse-input-event-bug.zip

mosquitochang avatar Aug 17 '24 21:08 mosquitochang