diff options
Diffstat (limited to 'core/os/input_event.cpp')
-rw-r--r-- | core/os/input_event.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index e94ccb4f48..12c6ef7d3b 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -949,6 +949,14 @@ bool InputEventAction::is_pressed() const { return pressed; } +bool InputEventAction::shortcut_match(const Ref<InputEvent> &p_event) const { + Ref<InputEventKey> event = p_event; + if (event.is_null()) + return false; + + return event->is_action(action); +} + bool InputEventAction::is_action(const StringName &p_action) const { return action == p_action; |