bool InputEvent::is_action_pressed(const StringName &p_action) const { bool pressed; bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, &pressed); return valid && pressed && !is_echo(); }
bool InputEvent::is_action_pressed(const String& p_action) const { return is_action(p_action) && is_pressed() && !is_echo(); }