Solved: MicroPython sees BS as BS ESC [ K
Posted: Mon Sep 25, 2023 2:02 pm
I wasn't quite sure how specific to make my Subject...
I have a Pico board running MicroPython. In the REPL, it "sees" my BS key as a hex "08 1B 5B 4B", which is BS ESC [ K.
My keyboard is an Apple Magic Keyboard and I've also tested with an Apple Keyboard circa 2015, both exhibit the same behavior.
I don't see this issue in other serial programs such as tio, Serial and miniterm.
I tried many options including the Options - Data Handling - Handle BS and DEL characters to no avail.
I've also tried going from System Defaults in Text Encoding to ASCII, MacRoman and UTF8.
When I send an hex 08 via Send String, it shows up as the same set of four characters, though it does backspace over the last character.
I haven't found anything in MicroPython, which would indicate that it is at fault. It might very well be...however, I thought I'd check here as well.
Thanks,
Lief
www.wellys.com
I have a Pico board running MicroPython. In the REPL, it "sees" my BS key as a hex "08 1B 5B 4B", which is BS ESC [ K.
My keyboard is an Apple Magic Keyboard and I've also tested with an Apple Keyboard circa 2015, both exhibit the same behavior.
I don't see this issue in other serial programs such as tio, Serial and miniterm.
I tried many options including the Options - Data Handling - Handle BS and DEL characters to no avail.
I've also tried going from System Defaults in Text Encoding to ASCII, MacRoman and UTF8.
When I send an hex 08 via Send String, it shows up as the same set of four characters, though it does backspace over the last character.
I haven't found anything in MicroPython, which would indicate that it is at fault. It might very well be...however, I thought I'd check here as well.
Thanks,
Lief
www.wellys.com