I am Joshua Poehls. Say hello Archives (not so) silent thoughts

Using Unix terminal shortcuts in the Windows command prompt

Unix terminals have a few basic keyboard shortcuts.

  • CTRL+L to clear the window
  • CTRL+D to close the window
  • CTRL+V to paste text

The Windows command prompt doesn’t support these by default but we can fix that with AutoHotkey.

If you don’t already have it installed, you can follow the steps in my blog post.

Add this magic to your AutoHotkey script to enable these shortcuts in the Windows command prompt and PowerShell.

#IfWinActive ahk_class ConsoleWindowClass
^L::SendInput , {Esc}cls{Enter}
^D::SendInput , {Esc}exit{Enter}
^V::SendInput , {Raw}%clipboard%
#IfWinActive

Back away from the mouse, my friends.

⦿