One of my favourite features in iterm2 is the ability to completely clear the screen (and the scrollback buffer as well) with a single keystroke. No matter what's on the screen, it all gets cleared. Do you think something similar is achievable with kitty? The main thing is, doing it without having to put the current process in background to enter a shell command or send some key sequence.
You're the man! Thanks a lot, this is exactly what I needed! Great job! :) :) :+1:
I'd like to add a small addendum to this: The new scrollback clearing code does wipe scrollback, but then only clears the screen and moves your cursor to the upper-left corner, without redrawing the prompt. This can be combined with sending a hex 0c (ctrl-L, which will tell the os to redraw the prompt) to the terminal with this config entry:
map cmd+k combine : clear_terminal scrollback active : send_text normal \x0c
...which makes cmd-k act as you'd expect if you're switching over from iTerm.
map cmd +k combine : clear_terminal scrollback active : send_text normal,application \x0c is what worked for me
map cmd+k send_text terminal,application \x63\x6C\x65\x61\x72\x0A seems to be working for an ohmyzsh + kitty configuration on macOS.
Most helpful comment
I'd like to add a small addendum to this: The new scrollback clearing code does wipe scrollback, but then only clears the screen and moves your cursor to the upper-left corner, without redrawing the prompt. This can be combined with sending a hex 0c (ctrl-L, which will tell the os to redraw the prompt) to the terminal with this config entry:
map cmd+k combine : clear_terminal scrollback active : send_text normal \x0c...which makes cmd-k act as you'd expect if you're switching over from iTerm.