cls - Clear screen API and hotkey #398

Open
opened 2026-01-30 21:50:53 +00:00 by claunia · 0 comments
Owner

Originally created by @mixmastamyk on GitHub (Oct 7, 2018).

Thanks for all the improvements lately and apologies that I'm not registered on the other site.

I'm here to complain about the API to clear the screen/console. Looks like it was designed by clowns, where you have to iterate over the whole grid to fill it with spaces. This is particularly hard to implement with Python and ctypes, though it doesn't get much easier in other languages:

Could we get a simple method, like for example, setting the title is?

- kernel32.SetConsoleTitleW(title)
- kernel32.ClearConsoleScreenPlease()

Also, while we're on the subject, please add a "Ctrl+L" hotkey to clear the screen. I hit that instinctively when away from Linux and OSX, and always a pain when it doesn't work on Windows.

Thanks again! 

Your Windows build number: 17134

Originally created by @mixmastamyk on GitHub (Oct 7, 2018). Thanks for all the improvements lately and apologies that I'm not registered on the other site. I'm here to complain about the API to clear the screen/console. Looks like it was designed by clowns, where you have to iterate over the whole grid to fill it with spaces. This is particularly hard to implement with Python and ctypes, though it doesn't get much easier in other languages: - https://docs.microsoft.com/en-us/windows/console/clearing-the-screen - https://github.com/tartley/colorama/blob/master/colorama/win32.py Could we get a simple method, like for example, setting the title is? - kernel32.SetConsoleTitleW(title) - kernel32.ClearConsoleScreenPlease() Also, while we're on the subject, please add a "Ctrl+L" hotkey to clear the screen. I hit that instinctively when away from Linux and OSX, and always a pain when it doesn't work on Windows. Thanks again!  Your Windows build number: 17134
claunia added the Product-ConhostIssue-QuestionIssue-DocsProduct-Cmd.exe labels 2026-01-30 21:50:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#398