Input occasionally not firing

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By OgGhostJelly

this is a weird one. whenever I press LEFT ARROW, then UP ARROW, then SPACE. in succession, the event doesn’t fire. this only seems to happen with this exact combination. remapping the keys to something else makes it work again.

here is the code:

extends Node2D


func _physics_process(delta):
	if Input.is_action_just_pressed("test"):
		print("interact")

my input maps:

:bust_in_silhouette: Reply From: Starfighter

Hi,
have you tried to use the function is_action_pressed() instead of the function is_action_just_pressed()?

func _physics_process(delta):
if Input.is_action_pressed("test"):
    print("interact")

Or maybe it’s due to keyboard ghosting?

Cheers.

Yup, it’s keyboard ghosting that’s the problem tysm! How do I fix this though?

OgGhostJelly | 2022-10-27 13:31

Hi,
You’ll be able to find more informations about keyboard ghosting at the following links:

Input examples — Godot Engine (stable) documentation in English

and

2d - How to avoid ghosting when pressing multiple keys? - Game Development Stack Exchange

I hope this will help you.
Good luck.

Cheers.

Starfighter | 2022-10-27 15:56