mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
Basic support the backspace key.
This doesn't mean we get any line editing just yet. But the keyboard device now recognizes the backspace key, and the console device knows what to do with the backspace characters.
This commit is contained in:
parent
29035ffde7
commit
bd2b5327d0
2 changed files with 9 additions and 1 deletions
|
@ -303,6 +303,14 @@ void Console::putChar(char ch)
|
|||
case '\033':
|
||||
m_escState = ExpectBracket;
|
||||
return;
|
||||
case 8: // Backspace
|
||||
if (m_cursorColumn) {
|
||||
--m_cursorColumn;\
|
||||
vga_set_cursor(m_cursorRow, m_cursorColumn);
|
||||
vga_putch_at(m_cursorRow, m_cursorColumn, ' ');
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case '\n':
|
||||
scrollup();
|
||||
vga_set_cursor(m_cursorRow, m_cursorColumn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue