How to check input type in Godot 3.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By D
:warning: Old Version Published before Godot 3 was released.

I can’t figure out how to check for the type of input being passed to _input() in Godot 3. Any help on this would be much appreciated.

:bust_in_silhouette: Reply From: volzhs
func _input(event):
    if event is InputEventMouseButton:
        # do something for mouse button
    elif event is InputEventMouseMotion:
        # do something for mouse drag