[Konsole] Settings -> Configure Keyboard Shortcuts ... "Clear Scrollback and Reset". On my Arch boxes it is mapped to Ctrl + Shift + k. That's probably a default from upstream.
Re:Clear Your Terminal in Style
by scrollaway on Thursday March 05, 2020 @04:57PM
(#22498788)
Tried it on konsole 19.12.2 (on Arch), it works for me.
Your "gut" is wrong. It's ED 3.
It's a common feature, but not formally standardized.
ED 3 isn't actually in the [ECMA-048] spec.
It was an xterm feature introduced in June 1999. Several terminal developers later adopted the feature. In April 2011, a Red Hat developer submitted a patch to the Linux kernel, modifying its console driver to do the same thing.
So it's not a formal standard, but it's universal on Linux since 3.0 and many terminal emulators have adopted it.
This history is covered in [clear(1)] from the ncurses project.
[ECMA-48]: http://www.ecma-international.org/publications/files/ECMA-ST...
[clear(1)]: http://man7.org/linux/man-pages/man1/clear.1.html#HISTORY
EDIT: Fix wording and formatting.
... none of which contradicts the point that the protocol does know about scrollback. The aforementioned developer, Petr Písař, got the implementation wrong, note.
* https://unix.stackexchange.com/a/375784/5132
* http://jdebp.uk./Softwares/nosh/guide/commands/setterm.xml
My gut is that the terminal protocol would know nothing about scrollback and thus not have a "clear scrollback" command in it directly. There are plenty of other indications that scrollback is basically a hack.