mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
console: Support delete as well as backspace
Some terminals do not generate backspace correctly, so accept delete as a substitute. BUG=chrome-os-partner:10147 TEST=manual: ssh into workstation, then telnet to serial port (with ser2net running) See that the backspace key now works correctly, instead of injecting strange characters into the terminal. Change-Id: Ief6f2bcab9b8e82cb5720d18c596326b49ffc336 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/24715 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -339,10 +339,10 @@ void uart_process(void)
|
||||
* don't interfere with the transmit buffer. */
|
||||
if (c == '\n')
|
||||
uart_write_char('\r');
|
||||
uart_write_char(c);
|
||||
uart_write_char(c == 0x7f ? '\b' : c);
|
||||
|
||||
/* Handle backspace if we can */
|
||||
if (c == '\b') {
|
||||
if (c == '\b' || c == 0x7f) {
|
||||
handle_backspace();
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user