You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
This commit is contained in:
@@ -344,7 +344,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
}
|
||||
} else {
|
||||
if (mb->get_button_index() == MouseButton::LEFT) {
|
||||
if (mb->is_command_pressed() && !symbol_lookup_word.is_empty()) {
|
||||
if (mb->is_command_or_control_pressed() && !symbol_lookup_word.is_empty()) {
|
||||
Vector2i mpos = mb->get_position();
|
||||
if (is_layout_rtl()) {
|
||||
mpos.x = get_size().x - mpos.x;
|
||||
@@ -371,7 +371,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
}
|
||||
|
||||
if (symbol_lookup_on_click_enabled) {
|
||||
if (mm->is_command_pressed() && mm->get_button_mask() == MouseButton::NONE && !is_dragging_cursor()) {
|
||||
if (mm->is_command_or_control_pressed() && mm->get_button_mask() == MouseButton::NONE && !is_dragging_cursor()) {
|
||||
symbol_lookup_new_word = get_word_at_pos(mpos);
|
||||
if (symbol_lookup_new_word != symbol_lookup_word) {
|
||||
emit_signal(SNAME("symbol_validate"), symbol_lookup_new_word);
|
||||
@@ -432,7 +432,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
|
||||
/* Allow unicode handling if: */
|
||||
/* No Modifiers are pressed (except shift) */
|
||||
bool allow_unicode_handling = !(k->is_command_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed());
|
||||
bool allow_unicode_handling = !(k->is_command_or_control_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed());
|
||||
|
||||
/* AUTO-COMPLETE */
|
||||
if (code_completion_enabled && k->is_action("ui_text_completion_query", true)) {
|
||||
|
||||
Reference in New Issue
Block a user