ConEmu: Keyboard shortcut to run "cls[ENTER]"

9

3

In ConEmu, is it possible to create a Macro to type/paste "cls" then press [ENTER] and (ideally) assign it the keyboard shortcut [CTRL]+L ?

I am trying to emulate the clear screen function of the Linux Shell but for the Windows Command Prompt/PowerShell.

atwright147

Posted 2013-07-24T21:17:41.353

Reputation: 219

Answers

22

Use GuiMacro (Keys & Macro page)

print("\ecls\n")

"\e" emulates Esc express, "\n" emulates Enter.

Of course, you may assign this macro to any desirable hotkey.

Maximus

Posted 2013-07-24T21:17:41.353

Reputation: 19 395

Brillant, works perfectly. – atwright147 – 2013-07-26T20:50:53.517

1

Consider using Clink, it provides full Readline experience (including Ctrl+L and history search). Works great with ConEmu too.

Vladimir Sizikov

Posted 2013-07-24T21:17:41.353

Reputation: 121

Clink does NOT works with powershell. – Maximus – 2013-07-26T20:56:45.580