summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
authorBhuvan Vemula <bhuvanvemula@gmail.com>2021-05-29 18:58:16 +0530
committerBhuvan Vemula <bhuvanvemula@gmail.com>2021-08-09 17:41:50 +0530
commita0a019a99826d7afbe701a3157324e8ccc1edf80 (patch)
treed691da471a230891c9274ef33e9ccd5c3c796270 /scene/main/viewport.cpp
parent504eb48214d8c2e723923c9025eb4a38180e7ac0 (diff)
Added EditorCommandPalette
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 8e7182df46..185936a3c6 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3099,6 +3099,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;
@@ -3118,8 +3119,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);
}