Godot is mouse button pressed code example
Example 1: godot check left mouse button
if (event.is_pressed() and event.button_index == BUTTON_LEFT):
print("Wow, a left mouse click")
Example 2: godot check if mouse button was just pressed
Add a input to the InputMap.