diff options
author | ajreckof <66184050+ajreckof@users.noreply.github.com> | 2023-06-08 23:24:00 +0200 |
---|---|---|
committer | ajreckof <tbonhoure@ymail.Com> | 2023-09-19 10:29:07 +0200 |
commit | 6afadbaa9f91ef69aea2c91f154f1e299e9cc863 (patch) | |
tree | fd8a516ed575f7aa59ea358e299c390cb4f1484a /scene/gui/text_edit.cpp | |
parent | 571cd0eb791b37e9a8adda9f909251138170f6b7 (diff) | |
download | redot-engine-6afadbaa9f91ef69aea2c91f154f1e299e9cc863.tar.gz |
Replace Ctrl in editor shortcuts with Cmd or Ctrl depending on platform
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 98bedd4493..4a013be1dc 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1598,7 +1598,7 @@ void TextEdit::_notification(int p_what) { if (is_drag_successful()) { if (selection_drag_attempt) { selection_drag_attempt = false; - if (is_editable() && !Input::get_singleton()->is_key_pressed(Key::CTRL)) { + if (is_editable() && !Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL)) { delete_selection(); } else if (deselect_on_focus_loss_enabled) { deselect(); @@ -2049,7 +2049,7 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) { // Allow unicode handling if: // * No modifiers are pressed (except Shift and CapsLock) - bool allow_unicode_handling = !(k->is_command_or_control_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed()); + bool allow_unicode_handling = !(k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed()); // Check and handle all built-in shortcuts. @@ -3077,13 +3077,13 @@ void TextEdit::drop_data(const Point2 &p_point, const Variant &p_data) { int caret_column_tmp = pos.x; if (selection_drag_attempt) { selection_drag_attempt = false; - if (!is_mouse_over_selection(!Input::get_singleton()->is_key_pressed(Key::CTRL))) { + if (!is_mouse_over_selection(!Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL))) { // Set caret back at selection for undo / redo. set_caret_line(get_selection_to_line(), false, false); set_caret_column(get_selection_to_column()); begin_complex_operation(); - if (!Input::get_singleton()->is_key_pressed(Key::CTRL)) { + if (!Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL)) { if (caret_row_tmp > get_selection_to_line()) { caret_row_tmp = caret_row_tmp - (get_selection_to_line() - get_selection_from_line()); } else if (caret_row_tmp == get_selection_to_line() && caret_column_tmp >= get_selection_to_column()) { |