#19702·micropython

Support some ANSI escape codes in pyexec repl

Author: VynDragonCreated Sep 15, 2026Updated Sep 15, 2026
Labelsenhancement

Description

Support using some ANSI escape codes in the REPL in shared/runtime/pyexec.c, , like Ctrl+Left arrow (\[5D) to allow navigating the command line faster.

Not sure if the best is to interpret them, like this ansi_handle, or pass them through unchanged.

Code Size

Like a whole function and a dozen defines, maybe 2 functions. appear likely to be easy to toggle from mpconfig.h.

Implementation

I hope the MicroPython maintainers or community will implement this feature, I intend to implement this feature and would submit a Pull Request if desirable

Code of Conduct

Yes, I agree