From 8b605179eb57bc3163533f9cc7cd274fe3caceae Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Sat, 18 Jul 2026 12:02:45 +0900 Subject: [PATCH] fbcond: translate CR to LF on keyboard input The keyboard input path pushed the raw character bytes, so the Enter key (a bare CR on the keymap) never produced an LF. Line-oriented readers on the console (e.g. a shell's read_line) then never saw a completed line and appeared to hang. Convert CR->LF here, matching the serial input path (push_input_bytes). --- drivers/graphics/fbcond/src/text.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/graphics/fbcond/src/text.rs b/drivers/graphics/fbcond/src/text.rs index 58a34b0f73..fbf03f89ba 100644 --- a/drivers/graphics/fbcond/src/text.rs +++ b/drivers/graphics/fbcond/src/text.rs @@ -88,7 +88,11 @@ impl TextScreen { } for &b in buf.iter() { - self.input.push_back(b); + // Translate a bare CR (what the Enter key produces on most keymaps) + // to LF, matching the serial input path (push_input_bytes). Without + // this, line-oriented readers such as a shell's read_line never see + // a completed line from keyboard input and appear to hang. + self.input.push_back(if b == b'\r' { b'\n' } else { b }); } }