This is an automated email from Gerrit. Tarek BOCHKATI ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/6094
-- gerrit commit 7439004c724791c40b7fdbbd814368cadd05eb87 Author: Tarek BOCHKATI <[email protected]> Date: Thu Mar 11 00:36:17 2021 +0100 telnet: support end and home keys this will help navigate to the line start and end easily Change-Id: I3f42eb5267df64c59a85ece67de5fce39a8843ec Signed-off-by: Tarek BOCHKATI <[email protected]> diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 407ab68..21423a2 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -596,6 +596,25 @@ 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 */ + /* go to line end */ + if (t_con->line_cursor < t_con->line_size) { + telnet_write(connection, + t_con->line + t_con->line_cursor, + t_con->line_size - t_con->line_cursor + ); + t_con->line_cursor = t_con->line_size; + t_con->state = TELNET_STATE_DATA; + } + } else if (*buf_p == 'H') { /* home key */ + /* go to line start */ + if (t_con->line_cursor > 0) { + telnet_write(connection, "\r", 1); + telnet_prompt(connection); + + t_con->line_cursor = 0; + t_con->state = TELNET_STATE_DATA; + } } else if (*buf_p == '3') t_con->last_escape = *buf_p; else -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
