How do you check if an action in the input map is constantly pressed?

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

I need information on wether a mouse button is pressed. One way to do it is like this:

if event is InputEventMouseButton && event.button_index == BUTTON_LEFT:
	if event.is_pressed():

But I want to do it through the key binding system

event.is_action_pressed("ui_select") # is only when you click
event.is_action("ui_select") # when you click and you stop clicking

They don’t actually return true while the mouse is pressed, how would I go about checking if a binded key is pressed?

:bust_in_silhouette: Reply From: Inces

If I understood correctly, You need to check Input in process() function.

func process():
        if Input.is_action_pressed("accept") :