diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-10 18:55:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 18:55:22 +0200 |
commit | dce488d8f786cd3f67719196d21fbeca9c8bf688 (patch) | |
tree | 6c489f4bc1ff4411f343a7bcf95e0fb2bbff4c9c /scene/main | |
parent | d915c187d0caeaf392c055e880c001c5835eae51 (diff) | |
parent | a0a019a99826d7afbe701a3157324e8ccc1edf80 (diff) |
Merge pull request #49417 from Bhu1-V/gsoc-cmd-plt
Command Palette For Godot
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 140c6f19f4..908950a714 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2704,6 +2704,7 @@ void Viewport::input(const Ref<InputEvent> &p_event, bool p_local_coords) { void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords) { ERR_FAIL_COND(p_event.is_null()); ERR_FAIL_COND(!is_inside_tree()); + local_input_handled = false; if (disable_input || !_can_consume_input_events()) { return; @@ -2723,8 +2724,8 @@ void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coor // Unhandled Input get_tree()->_call_input_pause(unhandled_input_group, "_unhandled_input", ev, this); - // Unhandled key Input - used for performance reasons - This is called a lot less then _unhandled_input since it ignores MouseMotion, etc - if (!is_input_handled() && Object::cast_to<InputEventKey>(*ev) != nullptr) { + // Unhandled key Input - used for performance reasons - This is called a lot less than _unhandled_input since it ignores MouseMotion, etc + if (!is_input_handled() && (Object::cast_to<InputEventKey>(*ev) != nullptr || Object::cast_to<InputEventShortcut>(*ev) != nullptr)) { get_tree()->_call_input_pause(unhandled_key_input_group, "_unhandled_key_input", ev, this); } |