← index #11354PR #14332
Duplicate · high · value 2.325
QUERY · ISSUE

REPL / built-in readline: Add CTRL-L support (clear screen)

openby neuschaeferopened 2023-04-27updated 2023-04-27
enhancement

Right now, the built-in readline implementation (shared/readline/readline.c) does not support CTRL-L, which is a somewhat common key to clear the the screen, and move the prompt and command line to the top of the screen. At least bash supports it.

This feature could be optional, and features like MICROPY_REPL_EMACS_KEYS already are, but the size savings wouldn't very much.

I might implement this myself If I get around to it. If anyone else want to do it, please let me know here.

CANDIDATE · PULL REQUEST

shared/readline: Implement CTRL-L (clear screen, redraw prompt)

openby neuschaeferopened 2024-04-19updated 2025-11-13
shared

This commit implements CTRL-L, a somewhat common key to clear the the screen and move the prompt and command line to the top of the screen. At least zsh, fish, ruby, and GNU readline support it.

Fixes: https://github.com/micropython/micropython/issues/11354

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied