Function InputEvent.isActionPressed

Returns true if the given action is being pressed (and is not an echo event for InputEventKey events, unless allow_echo is true). Not relevant for events of type InputEventMouseMotion or InputEventScreenDrag.

bool isActionPressed (
  const(String) action,
  const(bool) allow_echo = false
) nothrow @nogc const;