Merge pull request #19139 from KidRigger/master

Ensures CMD+left and CMD+right only valid for OSX.
This commit is contained in:
Rémi Verschelde 2018-05-25 12:00:57 +02:00 committed by GitHub
commit f5bc7156b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,12 +215,14 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
case (KEY_A): { //Select All
select();
} break;
#ifdef APPLE_STYLE_KEYS
case (KEY_LEFT): { // Go to start of text - like HOME key
set_cursor_position(0);
} break;
case (KEY_RIGHT): { // Go to end of text - like END key
set_cursor_position(text.length());
} break;
#endif
default: { handled = false; }
}