cmdline: support backspace key
Support windows putty "\b"(Ctrl-H) backspace key. Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
parent
aac6f11f58
commit
c89dc62533
@ -331,6 +331,7 @@ rdline_char_in(struct rdline *rdl, char c)
|
||||
|
||||
/* delete 1 char from the left */
|
||||
case CMDLINE_KEY_BKSPACE:
|
||||
case CMDLINE_KEY_BKSPACE2:
|
||||
if(!cirbuf_del_tail_safe(&rdl->left)) {
|
||||
rdline_puts(rdl, vt100_bs);
|
||||
display_right_buffer(rdl, 1);
|
||||
|
@ -95,6 +95,7 @@ const char *cmdline_vt100_commands[] = {
|
||||
"\020",
|
||||
"\016",
|
||||
"\033\144",
|
||||
vt100_bs,
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -117,6 +117,7 @@ extern "C" {
|
||||
#define CMDLINE_KEY_CTRL_P 23
|
||||
#define CMDLINE_KEY_CTRL_N 24
|
||||
#define CMDLINE_KEY_META_D 25
|
||||
#define CMDLINE_KEY_BKSPACE2 26
|
||||
|
||||
extern const char *cmdline_vt100_commands[];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user