Replace repetitive meta/ctrl condition with a method

This commit is contained in:
kobewi 2025-07-05 15:45:04 +02:00
parent 2d86b69bf1
commit 98141c3d73
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()) {