I want a shortcut key to clear the screen in my (Windows 7) psql console just like CTRL-l clears the screen in my R console. I am tired of typing '! cls'. Do I need to write a macro for this? I am running Postgres 9.35. '\r' resets the query buffer but does not clear the screen. Thanks in advance for your help, sorry if I have just missed something simple.
As an alternative to Ctrl-L use, e.g. for scripts in an linux environment:
\! clear
or
\! cls
for Microsoft.