I have a StaticBody2d that i want to detect when i press a key while moused over it. I am able to use
_input_event() to detect mouse clicks but it does not seem to work for key presses. Ideally I want to detect an
This works for mouse clicks, but no key press events are printed.
func _input_event(viewport, event, shape_idx):
if event is InputEventMouseButton :
if event.button_index == BUTTON_LEFT and event.is_pressed():
emit_signal("interact", self, tool_needed)