what is unhandle_input? i make this code

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: 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?

uhnandle
delta
delta
delta
delta
delta

:bust_in_silhouette: Reply From: Carl Marqs

From documentation:

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.

Thank you
I understood a little

bgegg | 2019-11-07 01:46

Thank you
I found that it was related to gui

bgegg | 2019-11-07 03:05