readline: Support odd backspace behaviour from serial

This addresses the problem with QEMU's serial input from terminal mentioned in issue #155
This commit is contained in:
mintsuki 2022-03-07 22:09:33 +01:00
parent af092292ea
commit f59a1eac0b

View File

@ -182,6 +182,8 @@ again:
return input_sequence();
}
goto again;
case 0x7f:
return '\b';
}
return ret;
@ -299,6 +301,10 @@ again:
kd.KeyState.KeyShiftState = 0;
}
if (kd.Key.ScanCode == 0x08) {
return '\b';
}
if (kd.Key.ScanCode == SCAN_ESC) {
gBS->CreateEvent(EVT_TIMER, TPL_CALLBACK, NULL, NULL, &events[1]);