Replace repetitive meta/ctrl condition with a method
This commit is contained in:
@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user