From 17d14fe51166ae7c6af6a6bd08e33c0c6315ef20 Mon Sep 17 00:00:00 2001 From: megalike Date: Wed, 1 May 2019 11:08:05 +0300 Subject: Support Mac OS default move cursor hotkeys Add missing FALLTHROUGH define --- scene/gui/text_edit.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'scene') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 729d3025c4..9d7ca95942 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2597,6 +2597,15 @@ void TextEdit::_gui_input(const Ref &p_gui_input) { } FALLTHROUGH; } +#ifdef APPLE_STYLE_KEYS + case KEY_B: { + if (!k->get_control()) { + scancode_handled = false; + break; + } + FALLTHROUGH; + } +#endif case KEY_LEFT: { if (k->get_shift()) @@ -2673,6 +2682,15 @@ void TextEdit::_gui_input(const Ref &p_gui_input) { } FALLTHROUGH; } +#ifdef APPLE_STYLE_KEYS + case KEY_F: { + if (!k->get_control()) { + scancode_handled = false; + break; + } + FALLTHROUGH; + } +#endif case KEY_RIGHT: { if (k->get_shift()) @@ -2734,6 +2752,15 @@ void TextEdit::_gui_input(const Ref &p_gui_input) { } FALLTHROUGH; } +#ifdef APPLE_STYLE_KEYS + case KEY_P: { + if (!k->get_control()) { + scancode_handled = false; + break; + } + FALLTHROUGH; + } +#endif case KEY_UP: { if (k->get_alt()) { @@ -2787,6 +2814,15 @@ void TextEdit::_gui_input(const Ref &p_gui_input) { } FALLTHROUGH; } +#ifdef APPLE_STYLE_KEYS + case KEY_N: { + if (!k->get_control()) { + scancode_handled = false; + break; + } + FALLTHROUGH; + } +#endif case KEY_DOWN: { if (k->get_alt()) { -- cgit v1.2.3