'Godot one player control two character first character forward not work

This is a game one player can control two characters,left hand control left character and right hand control right character,When I set project inputmap use W,A,S,D control left character, use left, right, top, bottom arrow control right character, there exist a situation that left W button not working:

Like player1 code is:

func _process() -> void:
    ...

    dir.x = Input.get_action_strength("left_move_right")-Input.get_action_strength("left_move_left")

    dir.z = Input.get_action_strength("left_move_back") - Input.get_action_strength("left_move_forward")

    ...

player2 code is:

func _process() -> void:
    ...

    dir.x = Input.get_action_strength("right_move_right") - Input.get_action_strength("right_move_left")

    dir.z = Input.get_action_strength("right_move_back") - Input.get_action_strength("right_move_forward")

    ...

When I first press right forward button,left forward button W not working。



Solution 1:[1]

This is just keyboard ghosting

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TiglathPileser