telnet: support end and home keys
[fw/openocd] / src / server / telnet_server.c
index 407ab68aefcd74d41d31f205e6e16fb3828cbef2..e9de4f033b30d93354089d55a19d0d9bf58be40b 100644 (file)
@@ -596,6 +596,12 @@ static int telnet_input(struct connection *connection)
                                                telnet_history_up(connection);
                                        } else if (*buf_p == 'B') {     /* cursor down */
                                                telnet_history_down(connection);
+                                       } else if (*buf_p == 'F') { /* end key */
+                                               telnet_move_cursor(connection, t_con->line_size);
+                                               t_con->state = TELNET_STATE_DATA;
+                                       } else if (*buf_p == 'H') { /* home key */
+                                               telnet_move_cursor(connection, 0);
+                                               t_con->state = TELNET_STATE_DATA;
                                        } else if (*buf_p == '3')
                                                t_con->last_escape = *buf_p;
                                        else