diff --git a/lib/mammoth/input/keyboard.cpp b/lib/mammoth/input/keyboard.cpp index 560aee9..aa7303d 100644 --- a/lib/mammoth/input/keyboard.cpp +++ b/lib/mammoth/input/keyboard.cpp @@ -102,6 +102,8 @@ void KeyboardListenerBase::HandleKeycode(Keycode code, Action action) { c = ' '; } else if (code == kTab) { c = '\t'; + } else if (code == kBackspace) { + c = '\b'; } else if (code == kLShift) { lshift_ = true; } else if (code == kRShift) { diff --git a/sys/teton/framebuffer/console.cpp b/sys/teton/framebuffer/console.cpp index 2121160..7e0a02e 100644 --- a/sys/teton/framebuffer/console.cpp +++ b/sys/teton/framebuffer/console.cpp @@ -7,6 +7,16 @@ void Console::WriteChar(char c) { CursorReturn(); return; } + if (c == '\t') { + WriteString(" "); + return; + } + if (c == '\b') { + cursor_pos_--; + WriteChar(' '); + cursor_pos_--; + return; + } uint64_t row = cursor_pos_ / cols(); if (row >= rows()) {