Quick answer: Godot 4 is_action_just_pressed firing repeatedly on held keys? OS key repeat synthesizes new press events - check the InputEventKey.echo flag to filter them.
Hold Space to charge a jump. The charge starts over every 30ms because the OS auto-repeat is feeding new press events.
Filter echo events
func _input(event):
if event is InputEventKey and event.echo:
returnEchoes are OS-driven key repeats. For UI text input you want them; for gameplay you almost never do.
Or poll the action
Input.is_action_pressed in _physics_process returns true while held without echo. Use the per-frame edge: just_pressed on the first true.
Disable input map echo
In Project Settings > Input Map > advanced, some actions can disable echo per-action. Not all action types support it.
“The OS thinks every long press is many short ones. Your game decides whether to agree.”
For competitive multiplayer, sample input via polling at fixed intervals. Echo events are a UX concept that has no place in your network input snapshot.