1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Add 0x7f as backspace key in shell

This commit is contained in:
Yao Wei 2014-09-24 15:40:21 +08:00
parent 208f889a4a
commit b5d3c65672

View File

@ -236,7 +236,8 @@ static int readline(shell_t *shell, char *buf, size_t size)
shell->put_char('\n');
return 0;
}
else if (c == '\b') {
/* QEMU uses 0x7f (DEL) as backspace, while 0x08 (BS) is for most terminals */
else if (c == 0x08 || c == 0x7f) {
if (line_buf_ptr == buf) {
/* The line is empty. */
continue;