Page 1 of 1

Solved: MicroPython sees BS as BS ESC [ K

Posted: Mon Sep 25, 2023 2:02 pm
by wellys
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

Re: MicroPython sees BS as BS ESC [ K

Posted: Mon Sep 25, 2023 2:24 pm
by wellys
SOLVED.

I went through some other postings related to ANSI codes and realized this must be an ANSI code issue.

For others, whom might see this same issue:
To fix: Options -> Data Handling -> Check Filter ANSI Escape Sequences

Explanation:
See this link: https://gist.github.com/fnky/458719343a ... a4f7296797 which Roger references here
https://forums.the-meiers.org/viewtopic.php?t=629.

Carry on.
Lief

Re: Solved: MicroPython sees BS as BS ESC [ K

Posted: Tue Sep 26, 2023 2:27 pm
by roger
Great! I'm glad you got it sorted.

Roger