summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authormegalike <megalike@gmail.com>2019-05-01 11:08:05 +0300
committermegalike <megalike@gmail.com>2019-05-01 13:45:00 +0300
commit17d14fe51166ae7c6af6a6bd08e33c0c6315ef20 (patch)
tree5431e1ab1429fe5664ad455ed73cc9dd0ba75ec2 /scene/gui
parent59b553b2af958b6fba019f8fb78326053039b2d3 (diff)
Support Mac OS default move cursor hotkeys
Add missing FALLTHROUGH define
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp36
1 files changed, 36 insertions, 0 deletions
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<InputEvent> &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<InputEvent> &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<InputEvent> &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<InputEvent> &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()) {