[Teton] Handle Tab and Backspace.
This commit is contained in:
parent
f01b447af4
commit
134185117d
|
@ -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) {
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue