Topic was automatically imported from the old Question2Answer platform.
Asked By
bgegg
func _process(delta):
if Input.is_key_pressed(KEY_A):
print("delta")
func _unhandled_input(event):
if event is InputEventKey:
if event.pressed and event.scancode == KEY_A:
print("unhandle")
The result is this
Does this mean that if key_a is used elsewhere, it won’t run?
What is this used for?
Called when an InputEvent hasn't been consumed by _input() or any GUI. The input event propagates up through the node tree until a node consumes it.
For gameplay input, this and _unhandled_key_input() are usually a better fit than _input() as they allow the GUI to intercept the events first.