Merge pull request #108314 from KoBeWi/shift_in_meta

Replace repetitive meta/ctrl condition with a method
This commit is contained in:
Thaddeus Crews 2025-11-10 17:47:08 -06:00
commit e33c423700
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
11 changed files with 25 additions and 13 deletions

View file

@ -504,7 +504,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
}
/* Ctrl + Hover symbols */
bool mac_keys = OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios");
bool mac_keys = OS::prefer_meta_over_ctrl();
if ((mac_keys && k->get_keycode() == Key::META) || (!mac_keys && k->get_keycode() == Key::CTRL)) {
if (symbol_lookup_on_click_enabled) {
if (k->is_pressed() && !is_dragging_cursor()) {