From 6541f6418e5b1f1f3a35a010dcb04bd04f5b4e6f Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Thu, 7 Jan 2016 22:45:28 +0100 Subject: TextEdit/LineEdit: Handle numpad PageUp, PageDown, Home and End --- scene/gui/line_edit.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scene/gui/line_edit.cpp') diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 917e9d331d..49ea077a30 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -285,12 +285,26 @@ void LineEdit::_input_event(InputEvent p_event) { } } break; + case KEY_KP_7: { + if (k.unicode != 0) { + handled = false; + break; + } + // numlock disabled. fallthrough to key_home + } case KEY_HOME: { shift_selection_check_pre(k.mod.shift); set_cursor_pos(0); shift_selection_check_post(k.mod.shift); } break; + case KEY_KP_1: { + if (k.unicode != 0) { + handled = false; + break; + } + // numlock disabled. fallthrough to key_end + } case KEY_END: { shift_selection_check_pre(k.mod.shift); -- cgit v1.2.3