Commit 4d56823
aiorepl: Fix Enter key handling in raw terminal mode.
Handle both CR (0x0D) and LF (0x0A) for command execution to ensure
compatibility with raw terminal mode where Enter sends CR instead of LF.
This fixes the issue where aiorepl required Ctrl+Enter instead of
just Enter to execute commands when used with MicroPython ports that
put stdin in raw mode (such as the updated unix port using pyexec).
Also improves handling of various newline sequences (CRLF, double-LF,
double-CR) to prevent double-execution of commands.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 5b496e9 commit 4d56823
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
0 commit comments