Merge pull request #28559 from megalike/mac_os_move_cursor_hotkeys

Support Mac OS default move cursor hotkeys
This commit is contained in:
Rémi Verschelde
2019-05-01 15:08:30 +02:00
committed by GitHub

View File

@@ -2596,6 +2596,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())
@@ -2672,6 +2681,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())
@@ -2733,6 +2751,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()) {
@@ -2786,6 +2813,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()) {