Skip to content

Commit

Permalink
Merge pull request #54004 from bruvzg/fix_multi_phy_key_map_3
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Oct 20, 2021
2 parents ae5cdf3 + b97ca39 commit 485d9c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/os/input_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,13 @@ bool InputEventKey::shortcut_match(const Ref<InputEvent> &p_event, bool p_exact_
return false;
}

return scancode == key->scancode &&
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask());
if (scancode == 0) {
return physical_scancode == key->physical_scancode &&
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask());
} else {
return scancode == key->scancode &&
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask());
}
}

void InputEventKey::_bind_methods() {
Expand Down

0 comments on commit 485d9c3

Please sign in to comment.